Skip to content

Commit

Permalink
adding test for rf change
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Apr 24, 2024
1 parent 7deaecf commit ce72635
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,35 @@ func UpdateClusterTest(ctx goctx.Context) {
Expect(err).Should(HaveOccurred())
},
)

It(
"UpdateReplicationFactor: should fail for updating namespace"+
"replication-factor on non-SC namespace. Cannot be updated",
func() {
By("RollingRestart By Adding Namespace Dynamically")

err := rollingRestartClusterByAddingNamespaceDynamicallyTest(
k8sClient, ctx, dynamicNs, clusterNamespacedName,
)
Expect(err).ToNot(HaveOccurred())

aeroCluster, err := getCluster(
k8sClient, ctx,
clusterNamespacedName,
)
Expect(err).ToNot(HaveOccurred())

nsList := aeroCluster.Spec.AerospikeConfig.Value["namespaces"].([]interface{})
namespaceConfig := nsList[len(nsList)-1].(map[string]interface{})
namespaceConfig["replication-factor"] = 3
aeroCluster.Spec.AerospikeConfig.Value["namespaces"].([]interface{})[len(nsList)-1] = namespaceConfig

err = k8sClient.Update(
ctx, aeroCluster,
)
Expect(err).Should(HaveOccurred())
},
)
},
)

Expand Down

0 comments on commit ce72635

Please sign in to comment.