1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39095 from StefanScherer/fix-TestPullWindowsImageFailsOnLinux

Use existing Windows image for test instead of microsoft/nanoserver
This commit is contained in:
Brian Goff 2019-04-17 10:46:14 -07:00 committed by GitHub
commit 4ed9059e55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,12 +266,12 @@ func (s *DockerHubPullSuite) TestPullClientDisconnect(c *check.C) {
func (s *DockerSuite) TestPullLinuxImageFailsOnWindows(c *check.C) {
testRequires(c, DaemonIsWindows, Network)
_, _, err := dockerCmdWithError("pull", "ubuntu")
assert.ErrorContains(c, err, "no matching manifest")
assert.ErrorContains(c, err, "no matching manifest for windows")
}
// Regression test for https://github.com/docker/docker/issues/28892
func (s *DockerSuite) TestPullWindowsImageFailsOnLinux(c *check.C) {
testRequires(c, DaemonIsLinux, Network)
_, _, err := dockerCmdWithError("pull", "microsoft/nanoserver")
assert.ErrorContains(c, err, "cannot be used on this platform")
_, _, err := dockerCmdWithError("pull", "mcr.microsoft.com/windows/servercore:ltsc2019")
assert.ErrorContains(c, err, "no matching manifest for linux")
}