Skip to content

Commit 6f20c37

Browse files
committed
fix assertions
1 parent 391c05c commit 6f20c37

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/controller/postgrescluster/snapshots_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,6 @@ func TestGetLatestCompleteBackupJob(t *testing.T) {
976976

977977
job2 := testBackupJob(cluster, "backup-job-one-complete-2")
978978
job2.Namespace = ns.Name
979-
job2.Name = "backup-job-2"
980979

981980
err = r.apply(ctx, job2)
982981
assert.NilError(t, err)
@@ -1010,7 +1009,7 @@ func TestGetLatestCompleteBackupJob(t *testing.T) {
10101009

10111010
latestCompleteBackupJob, err := r.getLatestCompleteBackupJob(ctx, cluster)
10121011
assert.NilError(t, err)
1013-
assert.Check(t, latestCompleteBackupJob.Name == "backup-job-1")
1012+
assert.Check(t, latestCompleteBackupJob.Name == "backup-job-one-complete-1")
10141013
})
10151014

10161015
t.Run("TwoCompleteBackupJobs", func(t *testing.T) {
@@ -1086,7 +1085,7 @@ func TestGetLatestCompleteBackupJob(t *testing.T) {
10861085

10871086
latestCompleteBackupJob, err := r.getLatestCompleteBackupJob(ctx, cluster)
10881087
assert.NilError(t, err)
1089-
assert.Check(t, latestCompleteBackupJob.Name == "backup-job-1")
1088+
assert.Check(t, latestCompleteBackupJob.Name == "backup-job-two-complete-1")
10901089
})
10911090
}
10921091

0 commit comments

Comments
 (0)