@@ -414,23 +414,23 @@ func TestAvailabilityZones(t *testing.T) {
414
414
fakeScope := newFakeScope (t , actuators .ControlPlane )
415
415
fakeReconciler := newFakeReconcilerWithScope (t , fakeScope )
416
416
417
- fakeReconciler .scope .MachineConfig .Zone = to . StringPtr ( "2" )
417
+ fakeReconciler .scope .MachineConfig .Zone = "2"
418
418
fakeReconciler .virtualMachinesSvc = & FakeVMCheckZonesService {
419
419
checkZones : []string {"2" },
420
420
}
421
421
if err := fakeReconciler .Create (context .Background ()); err != nil {
422
422
t .Errorf ("failed to create machine: %+v" , err )
423
423
}
424
424
425
- fakeReconciler .scope .MachineConfig .Zone = nil
425
+ fakeReconciler .scope .MachineConfig .Zone = ""
426
426
fakeReconciler .virtualMachinesSvc = & FakeVMCheckZonesService {
427
427
checkZones : []string {"" },
428
428
}
429
429
if err := fakeReconciler .Create (context .Background ()); err != nil {
430
430
t .Errorf ("failed to create machine: %+v" , err )
431
431
}
432
432
433
- fakeReconciler .scope .MachineConfig .Zone = to . StringPtr ( "1" )
433
+ fakeReconciler .scope .MachineConfig .Zone = "1"
434
434
fakeReconciler .virtualMachinesSvc = & FakeVMCheckZonesService {
435
435
checkZones : []string {"3" },
436
436
}
@@ -441,15 +441,15 @@ func TestAvailabilityZones(t *testing.T) {
441
441
442
442
func TestGetZone (t * testing.T ) {
443
443
testCases := []struct {
444
- inputZone * string
444
+ inputZone string
445
445
expected string
446
446
}{
447
447
{
448
- inputZone : nil ,
448
+ inputZone : "" ,
449
449
expected : "" ,
450
450
},
451
451
{
452
- inputZone : pointer . StringPtr ( "3" ) ,
452
+ inputZone : "3" ,
453
453
expected : "3" ,
454
454
},
455
455
}
0 commit comments