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

Adding a test for admin_commands #6414

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

dkrotx
Copy link
Member

@dkrotx dkrotx commented Oct 25, 2024

What changed?
For now it is a test for a single function: ResetQueue
Inroducing clitest package as a helper to write cli tests.
Previously we were mistakenly overriding flags in flag.FlagSet which
does not align with context.IsSet() - it thinks user did not provide
an argument.

Why?
Improving test-coverage

How did you test it?
Unit-test itself

Potential risks

Release notes

Documentation Changes

@dkrotx dkrotx force-pushed the testcov-admin-commands branch from e0a195f to 12729cb Compare October 25, 2024 13:36
Copy link
Contributor

@3vilhamster 3vilhamster left a comment

Choose a reason for hiding this comment

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

Neat approach!

For now it is a test for a single function: ResetQueue
Inroducing clitest package as a helper to write cli tests.
Previously we were mistakenly overriding flags in flag.FlagSet which
does not align with `context.IsSet()` - it thinks user did not provide
an argument.
To follow a new, shorter approach with newCLITestData/clitest.
To follow a new, shorter approach with newCLITestData/clitest.
@dkrotx dkrotx force-pushed the testcov-admin-commands branch from 12729cb to 4a703d3 Compare October 25, 2024 19:43
@dkrotx dkrotx enabled auto-merge (squash) October 25, 2024 19:45
@dkrotx dkrotx merged commit 9b812c5 into cadence-workflow:master Oct 25, 2024
17 of 18 checks passed
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.58%. Comparing base (692319c) to head (4a703d3).
Report is 2 commits behind head on master.

Additional details and impacted files
Files with missing lines Coverage Δ
tools/cli/clitest/context.go 100.00% <100.00%> (ø)

... and 15 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 692319c...4a703d3. Read the comment docs.

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.

2 participants