@@ -197,7 +197,7 @@ func TestCPCloudStackMachineValidateUpdateTemplateMutable(t *testing.T) {
197
197
Name : "newTemplate" ,
198
198
}
199
199
g := NewWithT (t )
200
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
200
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
201
201
}
202
202
203
203
func TestWorkersCPCloudStackMachineValidateUpdateTemplateMutable (t * testing.T ) {
@@ -212,7 +212,7 @@ func TestWorkersCPCloudStackMachineValidateUpdateTemplateMutable(t *testing.T) {
212
212
Name : "newTemplate" ,
213
213
}
214
214
g := NewWithT (t )
215
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
215
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
216
216
}
217
217
218
218
func TestCPCloudStackMachineValidateUpdateComputeOfferingMutable (t * testing.T ) {
@@ -228,7 +228,7 @@ func TestCPCloudStackMachineValidateUpdateComputeOfferingMutable(t *testing.T) {
228
228
Name : "newComputeOffering" ,
229
229
}
230
230
g := NewWithT (t )
231
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
231
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
232
232
}
233
233
234
234
func TestCPCloudStackMachineValidateUpdateDiskOfferingMutable (t * testing.T ) {
@@ -256,7 +256,7 @@ func TestCPCloudStackMachineValidateUpdateDiskOfferingMutable(t *testing.T) {
256
256
Label : "data_disk" ,
257
257
}
258
258
g := NewWithT (t )
259
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
259
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
260
260
}
261
261
262
262
func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailInvalidMountPath (t * testing.T ) {
@@ -284,7 +284,7 @@ func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailInvalidMountPat
284
284
Label : "data_disk" ,
285
285
}
286
286
g := NewWithT (t )
287
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().NotTo (Succeed ())
287
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().NotTo (Succeed ())
288
288
}
289
289
290
290
func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailEmptyDevice (t * testing.T ) {
@@ -312,7 +312,7 @@ func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailEmptyDevice(t *
312
312
Label : "data_disk" ,
313
313
}
314
314
g := NewWithT (t )
315
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().NotTo (Succeed ())
315
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().NotTo (Succeed ())
316
316
}
317
317
318
318
func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailEmptyFilesystem (t * testing.T ) {
@@ -340,7 +340,7 @@ func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailEmptyFilesystem
340
340
Label : "data_disk" ,
341
341
}
342
342
g := NewWithT (t )
343
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().NotTo (Succeed ())
343
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().NotTo (Succeed ())
344
344
}
345
345
346
346
func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailEmptyLabel (t * testing.T ) {
@@ -368,7 +368,7 @@ func TestCPCloudStackMachineValidateUpdateDiskOfferingMutableFailEmptyLabel(t *t
368
368
Label : "" ,
369
369
}
370
370
g := NewWithT (t )
371
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().NotTo (Succeed ())
371
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().NotTo (Succeed ())
372
372
}
373
373
374
374
func TestCPCloudStackMachineValidateUpdateSymlinksMutable (t * testing.T ) {
@@ -384,7 +384,7 @@ func TestCPCloudStackMachineValidateUpdateSymlinksMutable(t *testing.T) {
384
384
"/var/log" : "/data_2/var/log" ,
385
385
}
386
386
g := NewWithT (t )
387
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
387
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
388
388
}
389
389
390
390
func TestCPCloudStackMachineValidateUpdateSymlinksMutableInvalidComma (t * testing.T ) {
@@ -400,7 +400,7 @@ func TestCPCloudStackMachineValidateUpdateSymlinksMutableInvalidComma(t *testing
400
400
"/var/log" : "/data_2/var/log,d" ,
401
401
}
402
402
g := NewWithT (t )
403
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().NotTo (Succeed ())
403
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().NotTo (Succeed ())
404
404
}
405
405
406
406
func TestCPCloudStackMachineValidateUpdateSymlinksMutableColon (t * testing.T ) {
@@ -416,7 +416,7 @@ func TestCPCloudStackMachineValidateUpdateSymlinksMutableColon(t *testing.T) {
416
416
"/var/log" : "/data_2/var/log:d" ,
417
417
}
418
418
g := NewWithT (t )
419
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().NotTo (Succeed ())
419
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().NotTo (Succeed ())
420
420
}
421
421
422
422
func TestWorkersCPCloudStackMachineValidateUpdateComputeOfferingMutable (t * testing.T ) {
@@ -431,7 +431,7 @@ func TestWorkersCPCloudStackMachineValidateUpdateComputeOfferingMutable(t *testi
431
431
Name : "newComputeOffering" ,
432
432
}
433
433
g := NewWithT (t )
434
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
434
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
435
435
}
436
436
437
437
func TestWorkersCPCloudStackMachineValidateUpdateDiskOfferingMutable (t * testing.T ) {
@@ -455,7 +455,7 @@ func TestWorkersCPCloudStackMachineValidateUpdateDiskOfferingMutable(t *testing.
455
455
Label : "data_disk" ,
456
456
}
457
457
g := NewWithT (t )
458
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
458
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
459
459
}
460
460
461
461
func TestManagementCloudStackMachineValidateUpdateSshAuthorizedKeyMutable (t * testing.T ) {
@@ -469,7 +469,7 @@ func TestManagementCloudStackMachineValidateUpdateSshAuthorizedKeyMutable(t *tes
469
469
470
470
c .Spec .Users [0 ].SshAuthorizedKeys [0 ] = "rsa-laDeLala"
471
471
g := NewWithT (t )
472
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
472
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
473
473
}
474
474
475
475
func TestWorkloadCloudStackMachineValidateUpdateSshAuthorizedKeyMutable (t * testing.T ) {
@@ -482,7 +482,7 @@ func TestWorkloadCloudStackMachineValidateUpdateSshAuthorizedKeyMutable(t *testi
482
482
483
483
c .Spec .Users [0 ].SshAuthorizedKeys [0 ] = "rsa-laDeLala"
484
484
g := NewWithT (t )
485
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
485
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
486
486
}
487
487
488
488
func TestWorkloadCloudStackMachineValidateUpdateSshUsernameMutable (t * testing.T ) {
@@ -497,7 +497,7 @@ func TestWorkloadCloudStackMachineValidateUpdateSshUsernameMutable(t *testing.T)
497
497
498
498
c .Spec .Users [0 ].Name = "Andy"
499
499
g := NewWithT (t )
500
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().To (Succeed ())
500
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().To (Succeed ())
501
501
}
502
502
503
503
func TestWorkloadCloudStackMachineValidateUpdateInvalidUsers (t * testing.T ) {
@@ -512,7 +512,7 @@ func TestWorkloadCloudStackMachineValidateUpdateInvalidUsers(t *testing.T) {
512
512
513
513
c .Spec .Users [0 ].Name = ""
514
514
g := NewWithT (t )
515
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().ToNot (Succeed ())
515
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().ToNot (Succeed ())
516
516
}
517
517
518
518
func TestCloudStackMachineValidateUpdateInvalidType (t * testing.T ) {
@@ -521,7 +521,7 @@ func TestCloudStackMachineValidateUpdateInvalidType(t *testing.T) {
521
521
c := & v1alpha1.CloudStackMachineConfig {}
522
522
523
523
g := NewWithT (t )
524
- g .Expect (c .ValidateUpdate (ctx , c , vOld )).Error ().NotTo (Succeed ())
524
+ g .Expect (c .ValidateUpdate (ctx , vOld , c )).Error ().NotTo (Succeed ())
525
525
}
526
526
527
527
func cloudstackMachineConfig () v1alpha1.CloudStackMachineConfig {
@@ -555,7 +555,7 @@ func TestCloudStackMachineValidateUpdateAffinityImmutable(t *testing.T) {
555
555
556
556
c .Spec .Affinity = "anti"
557
557
g := NewWithT (t )
558
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().ToNot (Succeed ())
558
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().ToNot (Succeed ())
559
559
}
560
560
561
561
func TestCloudStackMachineValidateUpdateAffinityGroupIdsImmutable (t * testing.T ) {
@@ -567,11 +567,11 @@ func TestCloudStackMachineValidateUpdateAffinityGroupIdsImmutable(t *testing.T)
567
567
568
568
c .Spec .AffinityGroupIds = []string {}
569
569
g := NewWithT (t )
570
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().ToNot (Succeed ())
570
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().ToNot (Succeed ())
571
571
572
572
c .Spec .AffinityGroupIds = []string {"affinity-group-2" }
573
573
g = NewWithT (t )
574
- g .Expect (c .ValidateUpdate (ctx , c , & vOld )).Error ().ToNot (Succeed ())
574
+ g .Expect (c .ValidateUpdate (ctx , & vOld , c )).Error ().ToNot (Succeed ())
575
575
}
576
576
577
577
func TestCloudStackMachineConfigValidateCreateCastFail (t * testing.T ) {
0 commit comments