Skip to content

Commit 4f740fc

Browse files
committed
Reverting back to r.apply in two more places where the test is failing
1 parent 71c78a9 commit 4f740fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/postgrescluster/snapshots_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ func TestGetLatestCompleteBackupJob(t *testing.T) {
880880
job2.Namespace = ns.Name
881881
job2.Name = "backup-job-2"
882882

883-
assert.NilError(t, r.Client.Create(ctx, job2))
883+
assert.NilError(t, r.apply(ctx, job2))
884884

885885
// Get job1 and update Status.
886886
assert.NilError(t, r.Client.Get(ctx, client.ObjectKeyFromObject(job1), job1))
@@ -1117,7 +1117,7 @@ func TestGetSnapshotsForCluster(t *testing.T) {
11171117
}
11181118
snapshot2.Spec.Source.PersistentVolumeClaimName = initialize.String("another-pvc-name")
11191119
snapshot2.Spec.VolumeSnapshotClassName = initialize.String("another-class-name")
1120-
assert.NilError(t, r.Client.Create(ctx, snapshot2))
1120+
assert.NilError(t, r.apply(ctx, snapshot2))
11211121

11221122
snapshots, err := r.getSnapshotsForCluster(ctx, cluster)
11231123
assert.NilError(t, err)

0 commit comments

Comments
 (0)