@@ -1320,7 +1320,7 @@ RUN date --utc > /root/date.txt`, testImageAlpine),
1320
1320
ctx , cancel := context .WithCancel (context .Background ())
1321
1321
t .Cleanup (cancel )
1322
1322
1323
- wantOutput := []string {
1323
+ wantSpecificOutput := []string {
1324
1324
"containeruser" ,
1325
1325
"FROM_CONTAINER_ENV=containerEnv" ,
1326
1326
"FROM_REMOTE_ENV=remoteEnv" ,
@@ -1387,7 +1387,7 @@ RUN date --utc > /root/date.txt`, testImageAlpine),
1387
1387
defer cli .Close ()
1388
1388
1389
1389
var started bool
1390
- var wantEnv , gotEnv []string
1390
+ var wantOutput , gotOutput []string
1391
1391
logs , _ := streamContainerLogs (t , cli , ctrID )
1392
1392
for {
1393
1393
log := <- logs
@@ -1399,7 +1399,7 @@ RUN date --utc > /root/date.txt`, testImageAlpine),
1399
1399
break
1400
1400
}
1401
1401
if started {
1402
- wantEnv = append (wantEnv , log )
1402
+ wantOutput = append (wantOutput , log )
1403
1403
}
1404
1404
}
1405
1405
started = false
@@ -1425,18 +1425,18 @@ RUN date --utc > /root/date.txt`, testImageAlpine),
1425
1425
break
1426
1426
}
1427
1427
if started {
1428
- gotEnv = append (gotEnv , log )
1428
+ gotOutput = append (gotOutput , log )
1429
1429
}
1430
1430
}
1431
1431
1432
- slices .Sort (wantEnv )
1433
- slices .Sort (gotEnv )
1434
- if diff := cmp .Diff (wantEnv , gotEnv ); diff != "" {
1432
+ slices .Sort (wantOutput )
1433
+ slices .Sort (gotOutput )
1434
+ if diff := cmp .Diff (wantOutput , gotOutput ); diff != "" {
1435
1435
t .Fatalf ("unexpected output (-want +got):\n %s" , diff )
1436
1436
}
1437
1437
1438
- for _ , want := range wantOutput {
1439
- assert .Contains (t , gotEnv , want , "expected env var %q to be present" , want )
1438
+ for _ , want := range wantSpecificOutput {
1439
+ assert .Contains (t , gotOutput , want , "expected specific output %q to be present" , want )
1440
1440
}
1441
1441
})
1442
1442
0 commit comments