@@ -843,7 +843,7 @@ func TestGetLatestCompleteBackupJob(t *testing.T) {
843843 job1 := testBackupJob (cluster )
844844 job1 .Namespace = ns .Name
845845
846- err := r .Client . Create (ctx , job1 )
846+ err := r .apply (ctx , job1 )
847847 assert .NilError (t , err )
848848
849849 job2 := testBackupJob (cluster )
@@ -873,7 +873,7 @@ func TestGetLatestCompleteBackupJob(t *testing.T) {
873873 job1 := testBackupJob (cluster )
874874 job1 .Namespace = ns .Name
875875
876- err := r .Client . Create (ctx , job1 )
876+ err := r .apply (ctx , job1 )
877877 assert .NilError (t , err )
878878
879879 job2 := testBackupJob (cluster )
@@ -1057,7 +1057,7 @@ func TestGetSnapshotsForCluster(t *testing.T) {
10571057 }
10581058 snapshot1 .Spec .Source .PersistentVolumeClaimName = initialize .String ("some-pvc-name" )
10591059 snapshot1 .Spec .VolumeSnapshotClassName = initialize .String ("some-class-name" )
1060- err := r .Client . Create (ctx , snapshot1 )
1060+ err := r .apply (ctx , snapshot1 )
10611061 assert .NilError (t , err )
10621062
10631063 snapshot2 := & volumesnapshotv1.VolumeSnapshot {
@@ -1099,7 +1099,7 @@ func TestGetSnapshotsForCluster(t *testing.T) {
10991099 }
11001100 snapshot1 .Spec .Source .PersistentVolumeClaimName = initialize .String ("some-pvc-name" )
11011101 snapshot1 .Spec .VolumeSnapshotClassName = initialize .String ("some-class-name" )
1102- err := r .Client . Create (ctx , snapshot1 )
1102+ err := r .apply (ctx , snapshot1 )
11031103 assert .NilError (t , err )
11041104
11051105 snapshot2 := & volumesnapshotv1.VolumeSnapshot {
@@ -1299,7 +1299,7 @@ func TestDeleteSnapshots(t *testing.T) {
12991299 },
13001300 }
13011301 assert .NilError (t , r .setControllerReference (rhinoCluster , snapshot1 ))
1302- assert .NilError (t , r .Client . Create (ctx , snapshot1 ))
1302+ assert .NilError (t , r .apply (ctx , snapshot1 ))
13031303
13041304 snapshot2 := & volumesnapshotv1.VolumeSnapshot {
13051305 TypeMeta : metav1.TypeMeta {
0 commit comments