feat(unified): data migration integration tests (#114418)
* feat: unified storage migrations integration tests * chore: add comment and adjust db path name * chore: refactor test cases into interface
This commit is contained in:
committed by
GitHub
parent
cffca37999
commit
4c869a21a4
@@ -581,10 +581,16 @@ func TestMain(m *testing.M) {
|
||||
// nolint:staticcheck
|
||||
testSQLStore.cfg.IsFeatureToggleEnabled = features.IsEnabledGlobally
|
||||
|
||||
if err := testSQLStore.dialect.TruncateDBTables(testSQLStore.GetEngine()); err != nil {
|
||||
return nil, err
|
||||
skipTruncate := false
|
||||
if skip, present := os.LookupEnv("SKIP_DB_TRUNCATE"); present {
|
||||
skipTruncate = strings.ToLower(skip) == "true"
|
||||
}
|
||||
if !skipTruncate {
|
||||
if err := testSQLStore.dialect.TruncateDBTables(testSQLStore.GetEngine()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
testSQLStore.engine.ResetSequenceGenerator()
|
||||
}
|
||||
testSQLStore.engine.ResetSequenceGenerator()
|
||||
|
||||
if err := testSQLStore.Reset(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user