Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase testing coverage (and some related refactors) #86

Merged
merged 4 commits into from
May 3, 2023

Conversation

mariomac
Copy link
Contributor

@mariomac mariomac commented May 2, 2023

Raised coverage from <40% to 73,8%

New unit tests were created, but the improvement has been achieved also by generating and uploading coverage data from integration tests.

In linting, cyclomatic complexity limit has been decreased to 10, and few refactors were done to let linting pass in some complex functions.

@mariomac mariomac requested a review from grcevski May 2, 2023 14:58
// TODO: add shutdown hook for graceful stop
bp.Run(context.TODO())

// Adding shutdown hook for graceful stop
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grcevski this will conflict with your ongoing work, but I had to do it here because the runtime coverage generator requires a graceful stop

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's fine, not a problem. I'll merge.

@grafana grafana deleted a comment from codecov-commenter May 2, 2023
@mariomac mariomac changed the title Increase unit testing coverage (and some related refactors) Increase testing coverage (and some related refactors) May 2, 2023
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Very nice refactor!

// TODO: add shutdown hook for graceful stop
bp.Run(context.TODO())

// Adding shutdown hook for graceful stop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's fine, not a problem. I'll merge.

@mariomac mariomac merged commit a89145e into grafana:main May 3, 2023
3 checks passed
@mariomac mariomac deleted the test-refactor branch May 3, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants