Skip to content

Commit

Permalink
Fix webhook test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miles-Garnsey committed Apr 5, 2024
1 parent c0a8992 commit fe58745
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apis/k8ssandra/v1alpha1/k8ssandracluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,15 @@ func testInvalidDcName(t *testing.T) {
func testMedusaNonLocalNamespace(t *testing.T) {
required := require.New(t)
badCluster := createMinimalClusterObj("medusaconfig-nonlocal", "ns")
badCluster.Spec.Medusa.MedusaConfigurationRef.Namespace = "nonlocal-ns"
badCluster.Spec.Medusa = &medusaapi.MedusaClusterTemplate{
MedusaConfigurationRef: corev1.ObjectReference{
Namespace: "nonlocal-ns",
Name: "medusa-config",
},
StorageProperties: medusaapi.Storage{
Prefix: "some-prefix",
},
}
err := badCluster.validateK8ssandraCluster()
required.Error(err)
required.Contains(err.Error(), "Medusa config must be namespace local")
Expand Down

0 comments on commit fe58745

Please sign in to comment.