Skip to content

Commit

Permalink
Remove the hash check part from test after the ObservedGeneration != …
Browse files Browse the repository at this point in the history
…0 change
  • Loading branch information
burmanm committed Jul 24, 2024
1 parent a9a9a80 commit 753259d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,9 +953,7 @@ func createSingleDatacenterClusterWithUpgrade(t *testing.T, ctx context.Context,
assertCassandraDatacenterK8cStatusReady(ctx, t, f, kcKey.NamespacedName, dcKey.Name)
cassdc := &cassdcapi.CassandraDatacenter{}
require.NoError(f.Get(ctx, dcKey, cassdc))
dcHash := cassdc.ObjectMeta.Annotations[api.ResourceHashAnnotation]
dcPrefix := DcPrefix(t, f, dcKey)
verifyClusterReconcileFinished(ctx, t, f, k8ssandra)
require.NoError(f.Get(ctx, kcKey, k8ssandra))
// We have to do this, because the old version being installed at first doesn't have this field
k8ssandra.Status.ObservedGeneration = k8ssandra.Generation
Expand All @@ -967,18 +965,14 @@ func createSingleDatacenterClusterWithUpgrade(t *testing.T, ctx context.Context,

verifyClusterReconcileFinished(ctx, t, f, k8ssandra)
require.NoError(f.Get(ctx, dcKey, cassdc))
newDcHash := cassdc.ObjectMeta.Annotations[api.ResourceHashAnnotation]

require.Equal(dcHash, newDcHash, "CassandraDatacenter resource hash changed after upgrade")
require.NoError(f.Get(ctx, kcKey, k8ssandra))

require.Equal(corev1.ConditionTrue, k8ssandra.Status.GetConditionStatus(api.ClusterRequiresUpdate))
metav1.SetMetaDataAnnotation(&k8ssandra.ObjectMeta, api.AutomatedUpdateAnnotation, "always")
require.NoError(f.Update(ctx, kcKey, k8ssandra))
verifyClusterReconcileFinished(ctx, t, f, k8ssandra)
require.NoError(f.Get(ctx, dcKey, cassdc))
newDcHash = cassdc.ObjectMeta.Annotations[api.ResourceHashAnnotation]
require.NotEqual(dcHash, newDcHash, "CassandraDatacenter resource hash hasn't changed after upgrade")
}

// createSingleDatacenterCluster creates a K8ssandraCluster with one CassandraDatacenter
Expand Down

0 comments on commit 753259d

Please sign in to comment.