@@ -110,7 +110,7 @@ func TestStartStop(t *testing.T) {
110
110
{"UserAppExistsAfterStop" , validateAppExistsAfterStop },
111
111
{"AddonExistsAfterStop" , validateAddonAfterStop },
112
112
{"VerifyKubernetesImages" , validateKubernetesImages },
113
- {"Pause" , validatePauseAfterSart },
113
+ {"Pause" , validatePauseAfterStart },
114
114
}
115
115
for _ , stc := range serialTests {
116
116
if ctx .Err () == context .DeadlineExceeded {
@@ -233,7 +233,7 @@ func validateKubernetesImages(ctx context.Context, t *testing.T, profile string,
233
233
}
234
234
}
235
235
236
- func validatePauseAfterSart (ctx context.Context , t * testing.T , profile string , tcName string , tcVersion string , startArgs []string ) {
236
+ func validatePauseAfterStart (ctx context.Context , t * testing.T , profile string , tcName string , tcVersion string , startArgs []string ) {
237
237
defer PostMortemLogs (t , profile )
238
238
testPause (ctx , t , profile )
239
239
}
@@ -317,8 +317,16 @@ func testPulledImages(ctx context.Context, t *testing.T, profile string, version
317
317
}
318
318
sort .Strings (want )
319
319
sort .Strings (gotImages )
320
- if diff := cmp .Diff (want , gotImages ); diff != "" {
321
- t .Errorf ("%s images mismatch (-want +got):\n %s" , version , diff )
320
+ // check if we got all the images we want, ignoring any extraneous ones in cache (eg, may be created by other tests)
321
+ missing := false
322
+ for _ , img := range want {
323
+ if sort .SearchStrings (gotImages , img ) == len (gotImages ) {
324
+ missing = true
325
+ break
326
+ }
327
+ }
328
+ if missing {
329
+ t .Errorf ("%s images missing (-want +got):\n %s" , version , cmp .Diff (want , gotImages ))
322
330
}
323
331
}
324
332
0 commit comments