feat: Return violating resource in pkg/gator/test.Test#2198
Merged
maxsmythe merged 1 commit intoSep 28, 2022
Merged
Conversation
6812d5f to
a3f86b3
Compare
Member
|
@maxsmythe LGTY? |
Codecov Report
@@ Coverage Diff @@
## master #2198 +/- ##
==========================================
+ Coverage 54.36% 54.55% +0.19%
==========================================
Files 111 112 +1
Lines 9538 9568 +30
==========================================
+ Hits 5185 5220 +35
+ Misses 3954 3950 -4
+ Partials 399 398 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Contributor
|
It does, I was hoping to merge Davis's PR first to avoid the need to resolve a merge conflict on that PR |
e9dfc4a to
cb64804
Compare
Contributor
|
@julianKatz ready to merge after merge conflicts are resolved. |
During the refactoring of the Constraint Framework, the violating resource was removed from the pkg/types.Result struct. As this struct was returned in the public interface of Gatekeeper's pkg/gator/test.Test() function, consumers of that test package were deprived of their ability to discern which resource was causing the violation returned to them. This PR declares a new set of types in the `test` package that are meant to mirror those of CF's `types` package, but that include a reference to the violating object. This PR also updates the gator test CLI command to use this new interface. Signed-off-by: juliankatz <juliankatz@google.com>
cb64804 to
ced94bd
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During the refactoring of the Constraint Framework, the violating
resource was removed from the pkg/types.Result struct.
As this struct was returned in the public interface of Gatekeeper's
pkg/gator/test.Test() function, consumers of that test package were
deprived of their ability to discern which resource was causing the
violation returned to them.
This PR declares a new set of types in the
testpackage that are meantto mirror those of CF's
typespackage, but that include a reference tothe violating object.
This PR also updates the gator test CLI command to use this new
interface.
Signed-off-by: juliankatz juliankatz@google.com