-
Notifications
You must be signed in to change notification settings - Fork 740
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: Return violating resource in pkg/gator/test.Test #2198
feat: Return violating resource in pkg/gator/test.Test #2198
Conversation
6812d5f
to
a3f86b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@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. |
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
@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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 meantto mirror those of CF's
types
package, 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