Import Windows manifest into test build, rather than copying by script

This will ensure that we can always get the current Windows OS build
version, without being put into Windows 8 compatibility mode.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
Paul "TBBle" Hampson
2020-07-29 03:24:46 +10:00
parent eb6354a118
commit aa56cfc0a8
5 changed files with 41 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ import (
"path/filepath"
"github.com/Microsoft/hcsshim/osversion"
_ "github.com/Microsoft/hcsshim/test/functional/manifest" // For rsrc_amd64.syso
)
const (
@@ -53,9 +54,6 @@ func init() {
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")