@@ -32,9 +32,9 @@ func TestInstascaleMachineSet(t *testing.T) {
32
32
})
33
33
34
34
// look for machine set with aw name - expect to find it
35
- test .Expect (MachineSets (test )).Should (ContainElement (WithTransform (MachineSetId , Equal ("test-instascale" ))))
36
- // look for machine set replica - expect not to find it
37
- test .Expect (MachineExists (test )).Should (BeFalse ())
35
+ test .Expect (GetMachineSets (test )).Should (ContainElement (WithTransform (MachineSetId , Equal ("test-instascale" ))))
36
+ // look for machine belonging to the machine set, there should be none
37
+ test .Expect (GetMachines (test , "test-instascale" )).Should (BeEmpty ())
38
38
39
39
// // Setup batch job and AppWrapper
40
40
_ , aw , err := createInstaScaleJobAppWrapper (test , namespace , cm )
@@ -44,14 +44,14 @@ func TestInstascaleMachineSet(t *testing.T) {
44
44
test .Eventually (AppWrapper (test , namespace , aw .Name ), TestTimeoutGpuProvisioning ).
45
45
Should (WithTransform (AppWrapperState , Equal (mcadv1beta1 .AppWrapperStateActive )))
46
46
47
- //look for machine set replica - expect to find it
48
- test .Eventually (MachineExists (test ), TestTimeoutLong ).Should (BeTrue ( ))
47
+ // look for machine belonging to the machine set - expect to find it
48
+ test .Eventually (Machines (test , "test-instascale" ), TestTimeoutLong ).Should (HaveLen ( 1 ))
49
49
50
50
// assert that the AppWrapper goes to "Completed" state
51
- test .Eventually (AppWrapper (test , namespace , aw .Name ), TestTimeoutShort ).
51
+ test .Eventually (AppWrapper (test , namespace , aw .Name ), TestTimeoutMedium ).
52
52
Should (WithTransform (AppWrapperState , Equal (mcadv1beta1 .AppWrapperStateCompleted )))
53
53
54
- // look for machine set replica - expect not to find it
55
- test .Eventually (MachineExists (test ), TestTimeoutLong ).Should (BeFalse ())
54
+ // look for machine belonging to the machine set - there should be none
55
+ test .Eventually (Machines (test , "test-instascale" ), TestTimeoutLong ).Should (BeEmpty ())
56
56
57
57
}
0 commit comments