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

Add tests for rosdep checks #10

Merged
merged 7 commits into from
Sep 21, 2024
Merged

Add tests for rosdep checks #10

merged 7 commits into from
Sep 21, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Sep 9, 2024

These are the tests for the previously added rosdep checks. I found that in order to get good coverage, I needed to handle these cases:

  1. Check a violation while other non-violating changes are also checked to ensure that none of the check optimizations bypass something that should have been checked
  2. Check a violation while there are other possibly related violations to ensure that unexpected YAML structure doesn't break a different check

To exhaustively accomplish this, I made:

  1. A set of "existing" rules that represent the "current" state of the rosdep DB
  2. A set of "control" rules which should pass validation and are being checked
  3. A set of rules which violate each check in one way or another.

A test is then performed for each violation alone, each violation with the set of "control" changes, and also every possible combination of 2 violations.

Note that we still don't have support for all of the violations we want in this checker, this PR is just to "catch up" on the missing tests.

@cottsay cottsay added the enhancement New feature or request label Sep 9, 2024
@cottsay cottsay requested a review from clalancette September 9, 2024 23:39
@cottsay cottsay self-assigned this Sep 9, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.45%. Comparing base (7b81baf) to head (5e33148).

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #10       +/-   ##
===========================================
+ Coverage   44.57%   78.45%   +33.87%     
===========================================
  Files          13       13               
  Lines         673      673               
  Branches      176      176               
===========================================
+ Hits          300      528      +228     
+ Misses        367      128      -239     
- Partials        6       17       +11     

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

@cottsay
Copy link
Member Author

cottsay commented Sep 10, 2024

CI failure should be addressed by #11. Converting to draft until that is merged...

FIXED

@cottsay cottsay marked this pull request as draft September 10, 2024 00:54
@cottsay cottsay marked this pull request as ready for review September 10, 2024 15:44
@cottsay cottsay changed the base branch from main to cottsay/rosdep-win-paths September 18, 2024 18:18
@cottsay cottsay marked this pull request as draft September 18, 2024 18:18
@cottsay
Copy link
Member Author

cottsay commented Sep 18, 2024

Back to draft until #14 is merged.

Base automatically changed from cottsay/rosdep-win-paths to main September 20, 2024 19:30
@cottsay cottsay marked this pull request as ready for review September 20, 2024 19:34
@cottsay
Copy link
Member Author

cottsay commented Sep 21, 2024

Ugh, back to draft until #18 is merged.

No more "I'll add the tests in a later PR" business. This is ridiculous.

@cottsay cottsay marked this pull request as draft September 21, 2024 03:33
@cottsay cottsay changed the base branch from main to cottsay/another-windows-path-fix September 21, 2024 03:34
Base automatically changed from cottsay/another-windows-path-fix to main September 21, 2024 05:49
@cottsay cottsay marked this pull request as ready for review September 21, 2024 05:49
@cottsay cottsay merged commit 669a5e3 into main Sep 21, 2024
18 checks passed
@cottsay cottsay deleted the cottsay/devel branch September 21, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants