Skip to content

Commit 11e75fe

Browse files
authored
Make sure that the provided namespace will be used for HA tests (#2009)
1 parent 1541a73 commit 11e75fe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

e2e/fixtures/fdb_operator_fixtures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (factory *Factory) ensureHAFdbClusterExists(
168168
},
169169
}
170170

171-
namespaces := factory.MultipleNamespaces(dcIDs)
171+
namespaces := factory.MultipleNamespaces(config, dcIDs)
172172
log.Printf("ensureHAFDBClusterExists namespaces=%s", namespaces)
173173

174174
newConfig := config.Copy()

e2e/fixtures/kubernetes_fixtures.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,13 @@ func (factory *Factory) getRandomizedNamespaceName() string {
4747
}
4848

4949
// MultipleNamespaces creates multiple namespaces for HA testing.
50-
func (factory *Factory) MultipleNamespaces(dcIDs []string) []string {
51-
factory.options.namespace = factory.getRandomizedNamespaceName()
50+
func (factory *Factory) MultipleNamespaces(config *ClusterConfig, dcIDs []string) []string {
51+
// If a namespace is provided in the config we will use this name as prefix.
52+
if config.Namespace != "" {
53+
factory.options.namespace = config.Namespace
54+
} else {
55+
factory.options.namespace = factory.getRandomizedNamespaceName()
56+
}
5257

5358
res := make([]string, len(dcIDs))
5459
for idx, dcID := range dcIDs {

0 commit comments

Comments
 (0)