Skip to content

Conversation

@ncode
Copy link
Owner

@ncode ncode commented Sep 6, 2025

This pull request adds comprehensive tests for the success paths of both the cleanup and run commands in the CLI tool, ensuring that all required flags are correctly retrieved and validated without making real external calls. These tests help verify the commands' argument parsing and flag handling logic, improving overall reliability.

Test coverage improvements

  • Added TestCleanupCmdSuccessFlow to cmd/cleanup_test.go, which tests the successful execution path of the cleanup command by simulating flag retrieval and command execution.
  • Added TestRunCmdCompleteFlow to cmd/run_test.go, which tests the complete flow of the run command, including validation and retrieval of all required flags, interval parsing, and error handling for missing or invalid flags.

@codecov
Copy link

codecov bot commented Sep 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.91%. Comparing base (9146ff3) to head (7a33e19).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #20   +/-   ##
=======================================
  Coverage   72.91%   72.91%           
=======================================
  Files           7        7           
  Lines         432      432           
=======================================
  Hits          315      315           
  Misses        104      104           
  Partials       13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ncode ncode merged commit 1436999 into main Sep 6, 2025
5 checks passed
@ncode ncode deleted the ncode/coverage branch September 6, 2025 09:52
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.

1 participant