@@ -83,27 +83,26 @@ func dynamicConfig() map[dynamicconfig.Key]interface{} {
83
83
func (s * namespaceTestSuite ) SetupSuite () {
84
84
s .logger = log .NewTestLogger ()
85
85
86
- var clusterConfig * TestClusterConfig
87
- if TestFlags .PersistenceDriver == mysql .PluginNameV8 ||
88
- TestFlags .PersistenceDriver == postgresql .PluginNameV12 ||
89
- TestFlags .PersistenceDriver == sqlite .PluginName {
86
+ switch TestFlags .PersistenceDriver {
87
+ case mysql .PluginNameV8 , postgresql .PluginNameV12 , sqlite .PluginName :
90
88
var err error
91
- clusterConfig , err = GetTestClusterConfig ("testdata/integration_test_cluster.yaml" )
89
+ s . clusterConfig , err = GetTestClusterConfig ("testdata/integration_test_cluster.yaml" )
92
90
s .Require ().NoError (err )
93
- } else {
91
+ s .logger .Info (fmt .Sprintf ("Running delete namespace tests with %s/%s persistence" , TestFlags .PersistenceType , TestFlags .PersistenceDriver ))
92
+ default :
94
93
var err error
95
- clusterConfig , err = GetTestClusterConfig ("testdata/integration_test_es_cluster.yaml" )
94
+ s . clusterConfig , err = GetTestClusterConfig ("testdata/integration_test_es_cluster.yaml" )
96
95
s .Require ().NoError (err )
96
+ s .logger .Info ("Running delete namespace tests with Elasticsearch persistence" )
97
97
// Elasticsearch is needed to test advanced visibility code path in reclaim resources workflow.
98
- s .esClient = CreateESClient (& s .Suite , clusterConfig .ESConfig , s .logger )
99
- PutIndexTemplate (& s .Suite , s .esClient , fmt .Sprintf ("testdata/es_%s_index_template.json" , clusterConfig .ESConfig .Version ), "test-visibility-template" )
100
- CreateIndex (& s .Suite , s .esClient , clusterConfig .ESConfig .GetVisibilityIndex ())
98
+ s .esClient = CreateESClient (& s .Suite , s . clusterConfig .ESConfig , s .logger )
99
+ PutIndexTemplate (& s .Suite , s .esClient , fmt .Sprintf ("testdata/es_%s_index_template.json" , s . clusterConfig .ESConfig .Version ), "test-visibility-template" )
100
+ CreateIndex (& s .Suite , s .esClient , s . clusterConfig .ESConfig .GetVisibilityIndex ())
101
101
}
102
102
103
- s .clusterConfig = clusterConfig
104
- clusterConfig .DynamicConfigOverrides = dynamicConfig ()
103
+ s .clusterConfig .DynamicConfigOverrides = dynamicConfig ()
105
104
106
- cluster , err := NewCluster (clusterConfig , s .logger )
105
+ cluster , err := NewCluster (s . clusterConfig , s .logger )
107
106
s .Require ().NoError (err )
108
107
s .cluster = cluster
109
108
s .frontendClient = s .cluster .GetFrontendClient ()
0 commit comments