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

feat(gator): print object name on test output #3018

Merged

Conversation

Duologic
Copy link
Contributor

@Duologic Duologic commented Sep 22, 2023

What this PR does / why we need it:

When running gator test -f="directory/", it doesn't tell which file is violating the constraint. This may be fine for a small set of manifests but becomes annoying when validating large sets.

Special notes for your reviewer:

This is my first contribution here. The attempt I'm making aims to have a small footprint but that may be the completely wrong approach for this.

@Duologic Duologic marked this pull request as ready for review September 22, 2023 12:37
@Duologic Duologic marked this pull request as draft September 22, 2023 12:55
@Duologic

This comment was marked as outdated.

Signed-off-by: Duologic <jeroen@simplistic.be>
@Duologic Duologic force-pushed the duologic/gator_print_filename branch from 368ec65 to 2474d56 Compare September 22, 2023 13:18
@Duologic Duologic marked this pull request as ready for review September 22, 2023 13:19
@JaydipGabani
Copy link
Contributor

Thanks for the PR!

Signed-off-by: Duologic <jeroen@simplistic.be>
@Duologic
Copy link
Contributor Author

Fixed the unit test.

@maxsmythe maxsmythe changed the title feat(gator): print filename on test output feat(gator): print object name on test output Sep 26, 2023
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (83ca660) 52.55% compared to head (1e392a3) 52.47%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3018      +/-   ##
==========================================
- Coverage   52.55%   52.47%   -0.08%     
==========================================
  Files         134      134              
  Lines       11901    11937      +36     
==========================================
+ Hits         6254     6264      +10     
- Misses       5155     5181      +26     
  Partials      492      492              
Flag Coverage Δ
unittests 52.47% <20.40%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/gator/test/test.go 34.95% <55.55%> (+2.88%) ⬆️
pkg/cachemanager/cachemanager.go 37.13% <0.00%> (-2.79%) ⬇️

... and 3 files with indirect coverage changes

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

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the PR @Duologic! 🎉

@ritazh ritazh merged commit cbfcdde into open-policy-agent:master Sep 26, 2023
@Duologic Duologic deleted the duologic/gator_print_filename branch September 27, 2023 17:02
Mattes83 pushed a commit to Mattes83/gatekeeper that referenced this pull request Oct 25, 2023
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.

5 participants