Merge pull request #4427 from TBBle/test_improvements
Some small test improvements
This commit is contained in:
commit
eb6354a118
@ -169,8 +169,9 @@ func TestMain(m *testing.M) {
|
|||||||
fmt.Fprintln(os.Stderr, "failed to remove test root dir", err)
|
fmt.Fprintln(os.Stderr, "failed to remove test root dir", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
// only print containerd logs if the test failed
|
|
||||||
if status != 0 {
|
// only print containerd logs if the test failed or tests were run with -v
|
||||||
|
if status != 0 || testing.Verbose() {
|
||||||
fmt.Fprintln(os.Stderr, buf.String())
|
fmt.Fprintln(os.Stderr, buf.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,14 @@ func init() {
|
|||||||
testImage = "mcr.microsoft.com/windows/nanoserver:1903"
|
testImage = "mcr.microsoft.com/windows/nanoserver:1903"
|
||||||
case 18363: // this isn't in osversion yet, but the image should be available
|
case 18363: // this isn't in osversion yet, but the image should be available
|
||||||
testImage = "mcr.microsoft.com/windows/nanoserver:1909"
|
testImage = "mcr.microsoft.com/windows/nanoserver:1909"
|
||||||
|
case 19041: // this isn't in osversion yet, but the image should be available
|
||||||
|
testImage = "mcr.microsoft.com/windows/nanoserver:2004"
|
||||||
|
case 9200: // Missing manifest, so it's running in compatibility mode
|
||||||
|
fmt.Println("You need to copy Microsoft/hcsshim/test/functional/manifest/rsrc_amd64.syso into the containerd checkout")
|
||||||
|
panic("Running in Windows 8/Windows Server 2012 compatibility mode, failed to detect Windows build version")
|
||||||
|
default:
|
||||||
|
fmt.Println("No test image defined for Windows build version:", b)
|
||||||
|
panic("No windows test image found for this Windows build")
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Windows test image:", testImage, ", Windows build version:", b)
|
fmt.Println("Windows test image:", testImage, ", Windows build version:", b)
|
||||||
|
Loading…
Reference in New Issue
Block a user