@@ -32,9 +32,9 @@ func TestInstascaleMachineSet(t *testing.T) {
3232 })
3333
3434 // 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 ())
3838
3939 // // Setup batch job and AppWrapper
4040 _ , aw , err := createInstaScaleJobAppWrapper (test , namespace , cm )
@@ -44,14 +44,14 @@ func TestInstascaleMachineSet(t *testing.T) {
4444 test .Eventually (AppWrapper (test , namespace , aw .Name ), TestTimeoutGpuProvisioning ).
4545 Should (WithTransform (AppWrapperState , Equal (mcadv1beta1 .AppWrapperStateActive )))
4646
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 ))
4949
5050 // 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 ).
5252 Should (WithTransform (AppWrapperState , Equal (mcadv1beta1 .AppWrapperStateCompleted )))
5353
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 ())
5656
5757}
0 commit comments