Skip to content

Commit

Permalink
More prefix fixes in the test, add ConfigMap logging to objects
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Nov 27, 2024
1 parent 8d0f568 commit 9f6e9a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions test/e2e/per_node_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ func multiDcInitialTokens(t *testing.T, ctx context.Context, namespace string, f
checkDatacenterReady(t, ctx, dc1Key, f)
assertCassandraDatacenterK8cStatusReady(ctx, t, f, kcKey, dc1Key.Name)
dc1Prefix := DcPrefix(t, f, dc1Key)
configKey1Prefix := DcPrefixOverride(t, f, dc1Key)

checkDatacenterReady(t, ctx, dc2Key, f)
assertCassandraDatacenterK8cStatusReady(ctx, t, f, kcKey, dc2Key.Name)
dc2Prefix := DcPrefix(t, f, dc2Key)
configKey2Prefix := DcPrefixOverride(t, f, dc2Key)

t.Log("check that the ConfigMaps were created")

perNodeConfigMapKey1 := framework.NewClusterKey(f.DataPlaneContexts[0], namespace, fmt.Sprintf("%s-per-node-config", dc1Prefix))
perNodeConfigMapKey2 := framework.NewClusterKey(f.DataPlaneContexts[1], namespace, fmt.Sprintf("%s-per-node-config", dc2Prefix))
perNodeConfigMapKey1 := framework.NewClusterKey(f.DataPlaneContexts[0], namespace, fmt.Sprintf("%s-per-node-config", configKey1Prefix))
perNodeConfigMapKey2 := framework.NewClusterKey(f.DataPlaneContexts[1], namespace, fmt.Sprintf("%s-per-node-config", configKey2Prefix))

assert.Eventually(t, func() bool {
return f.Get(ctx, perNodeConfigMapKey1, &corev1.ConfigMap{}) == nil &&
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/reaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ func createMultiReaper(t *testing.T, ctx context.Context, namespace string, f *f

t.Logf("check Stargate auth keyspace created in both clusters. DC prefixes: %s / %s ", dc1Prefix, reaperStargate2Prefix)
checkKeyspaceExists(t, f, ctx, f.DataPlaneContexts[0], namespace, kc.SanitizedName(), dc1Prefix+"-default-sts-0", stargate.AuthKeyspace)
checkKeyspaceExists(t, f, ctx, f.DataPlaneContexts[1], namespace, kc.SanitizedName(), reaperStargate2Prefix+"-default-sts-0", stargate.AuthKeyspace)
checkKeyspaceExists(t, f, ctx, f.DataPlaneContexts[1], namespace, kc.SanitizedName(), dc2Prefix+"-default-sts-0", stargate.AuthKeyspace)

t.Log("check Reaper custom keyspace created in both clusters")
checkKeyspaceExists(t, f, ctx, f.DataPlaneContexts[0], namespace, kc.SanitizedName(), dc1Prefix+"-default-sts-0", "reaper_ks")
checkKeyspaceExists(t, f, ctx, f.DataPlaneContexts[1], namespace, kc.SanitizedName(), reaperStargate2Prefix+"-default-sts-0", "reaper_ks")
checkKeyspaceExists(t, f, ctx, f.DataPlaneContexts[1], namespace, kc.SanitizedName(), dc2Prefix+"-default-sts-0", "reaper_ks")

checkStargateReady(t, f, ctx, stargate1Key)
checkStargateK8cStatusReady(t, f, ctx, kcKey, dc1Key)
Expand Down
2 changes: 1 addition & 1 deletion test/framework/e2e_framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ func (f *E2eFramework) DumpClusterInfo(test string, namespaces ...string) error

// Dump all objects that we need to investigate failures as a flat list and as yaml manifests
for _, objectType := range []string{"K8ssandraCluster", "CassandraDatacenter", "Stargate", "Reaper", "StatefulSet", "Secrets",
"ReplicatedSecret", "ClientConfig", "CassandraTask", "MedusaBackup", "MedusaBackupJob", "MedusaRestoreJob", "MedusaTask"} {
"ReplicatedSecret", "ClientConfig", "CassandraTask", "MedusaBackup", "MedusaBackupJob", "MedusaRestoreJob", "MedusaTask", "ConfigMaps"} {
if err := os.MkdirAll(fmt.Sprintf("%s/%s/objects/%s", outputDir, namespace, objectType), 0755); err != nil {
return err
}
Expand Down

0 comments on commit 9f6e9a9

Please sign in to comment.