ROX-32714: Update graphQL postgres tests to work with imageV2 model#19477
ROX-32714: Update graphQL postgres tests to work with imageV2 model#19477charmik-redhat wants to merge 3 commits intomasterfrom
Conversation
|
Images are ready for the commit at c7a4430. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19477 +/- ##
==========================================
- Coverage 49.32% 49.25% -0.08%
==========================================
Files 2724 2725 +1
Lines 205227 205609 +382
==========================================
+ Hits 101231 101264 +33
- Misses 96459 96804 +345
- Partials 7537 7541 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| imageWithScanQuery = ` | ||
| query getImages($query: String, $pagination: Pagination) { | ||
| images(query: $query, pagination: $pagination) { | ||
| images(query: $query, pagination: $pagination) { |
There was a problem hiding this comment.
these trailing spaces are probably your style issue.
There was a problem hiding this comment.
Yeah, cursor adds those for some reason
| imageDataStore := imageMocks.NewMockDataStore(ctrl) | ||
| imageV2DataStore := imageV2Mocks.NewMockDataStore(ctrl) | ||
| cveMatcher, err := matcher.NewCVEMatcher(clusterDataStore, nsDataStore, imageDataStore, imageV2DataStore) | ||
| cveMatcher, err := matcher.NewCVEMatcher(clusterDataStore, nsDataStore, imageDataStore, nil) |
There was a problem hiding this comment.
What's the deal with this one? Would we not need to use image v2 with this?
There was a problem hiding this comment.
Right, we should use imageV2 there. I cherry-picked the changes from an older PR which just set imageV2Datastore to nil.
Removed this change.
Description
This PR updates graphql resolvers tests to work with imageV2 model enabled.
These changes were assisted by Cursor
User-facing documentation
Testing and quality
Automated testing
How I validated my change
Ran the updated tests with
ROX_FLATTEN_IMAGE_DATAenabled and disabled.