@@ -2393,6 +2393,7 @@ func TestInstanceDeletion(t *testing.T) {
2393
2393
expectedEvent string
2394
2394
eventNotExpected string
2395
2395
matchError error
2396
+ instance * core.Instance
2396
2397
errorSubStringMatch bool
2397
2398
testSpecificSetup func (machineScope * MachineScope , computeClient * mock_compute.MockComputeClient )
2398
2399
}{
@@ -2406,6 +2407,9 @@ func TestInstanceDeletion(t *testing.T) {
2406
2407
PreserveBootVolume : common .Bool (false ),
2407
2408
})).Return (core.TerminateInstanceResponse {}, nil )
2408
2409
},
2410
+ instance : & core.Instance {
2411
+ Id : common .String ("test" ),
2412
+ },
2409
2413
},
2410
2414
{
2411
2415
name : "delete instance error" ,
@@ -2418,6 +2422,9 @@ func TestInstanceDeletion(t *testing.T) {
2418
2422
PreserveBootVolume : common .Bool (false ),
2419
2423
})).Return (core.TerminateInstanceResponse {}, errors .New ("could not terminate instance" ))
2420
2424
},
2425
+ instance : & core.Instance {
2426
+ Id : common .String ("test" ),
2427
+ },
2421
2428
},
2422
2429
}
2423
2430
@@ -2427,7 +2434,7 @@ func TestInstanceDeletion(t *testing.T) {
2427
2434
defer teardown (t , g )
2428
2435
setup (t , g )
2429
2436
tc .testSpecificSetup (ms , computeClient )
2430
- err := ms .DeleteMachine (context .Background ())
2437
+ err := ms .DeleteMachine (context .Background (), tc . instance )
2431
2438
if tc .errorExpected {
2432
2439
g .Expect (err ).To (Not (BeNil ()))
2433
2440
if tc .errorSubStringMatch {
0 commit comments