Make unit tests pass with ROX_POSTGRES_DATASTORE flag both on and off#4719
Merged
connorgorman merged 7 commits intomasterfrom Feb 6, 2023
Merged
Make unit tests pass with ROX_POSTGRES_DATASTORE flag both on and off#4719connorgorman merged 7 commits intomasterfrom
connorgorman merged 7 commits intomasterfrom
Conversation
|
Images are ready for the commit at f39ec8c. To use with deploy scripts, first |
dashrews78
reviewed
Feb 6, 2023
| t.Skip("Skip postgres tests") | ||
| t.SkipNow() | ||
| } | ||
| pgtest.SkipIfPostgresEnabled(t) |
Contributor
There was a problem hiding this comment.
Was this one previously being skipped in Rocks mode?
Contributor
There was a problem hiding this comment.
I think this one needs to run in Postgres and not run in Rocks. Your change turns it off for Postgres. This is with the updated node CVE structure which requires Postgres unless i'm mistaken.
dashrews78
reviewed
Feb 6, 2023
|
|
||
| func (s *TestReportConfigurationServiceTestSuite) SetupTest() { | ||
| s.mockCtrl = gomock.NewController(s.T()) | ||
| if env.PostgresDatastoreEnabled.BooleanSetting() { |
Contributor
There was a problem hiding this comment.
use the new pgtest function?
Contributor
Author
There was a problem hiding this comment.
sort of trying to minimize changes tbh. This will eventually be all removed when pg flag is removed
theencee
approved these changes
Feb 6, 2023
5 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.
Description
Split out the code changes that would not need to be reverted based on the flag flip from #4690
These tests need to be ported over to using Postgres as they test functionality not dependent on RocksDB
Central/deployment/index/search_comparison_test.go
Central/splunk/violations_test
TestImageLoader - graphql/resolvers/loaders/images_test.go
TestImageIntegrationDataStore - central/imageintegration/datastore/datastore_impl.go
TestProcessBaselineService - central/processbaseline/service/service_impl_test.go
Role/datastore/datastore_test.go
Once merged, will create JIRAs
Checklist
If any of these don't apply, please comment below.
Testing Performed
Unit tests :)