-
Notifications
You must be signed in to change notification settings - Fork 17
Add queryfilter package and ExpectResourceDisplayName query check
#573
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
Conversation
queryfilter package and ExpectResourceDisplayName query checkqueryfilter package and ExpectResourceDisplayNameExact query check
austinvalle
left a comment
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.
stephybun
left a comment
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.
Thanks @SBGoods LGTM 💯
Before we release I think we should also remove the ContainsResourceWithName check since the ExpectResourceDisplayNameExact check now supersedes it.
gdavison
left a comment
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.
Using a querycheck that uses a filter removes other results for all subsequent querychecks
…`ByDisplayNameRegexp` filters
…ngcheck` interface
queryfilter package and ExpectResourceDisplayNameExact query checkqueryfilter package and ExpectResourceDisplayName query check
austinvalle
left a comment
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.
Everything LGTM, I had one question about the new interface, but I don't have a major problem with it as-is 🚀
Co-authored-by: Austin Valle <austinvalle@gmail.com>
Related Issue
Fixes #565
Description
Adds a new
queryfilterpackage andQueryFilterinterface for implementing declarative logic for filtering query results before the results are passed as input for aQueryCheck. This could be used to apply a check to a certain subset of results or as a lookup mechanism to check a specific result.Filters are implemented at the query check level, so a single test step can have multiple independent query checks with their own filtering.
The current implementations of query filters are:
FilterByDisplayNameFilterByResourceIdentity()This PR also introduces a new
ExpectResourceDisplayName()query check that takes a filter and knownvalue.stringcheck for the display name as input and asserts that the display name matches the input after filtering.Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
No