Use existing Windows image for test instead of microsoft/nanoserver#39095
Conversation
778168f to
a147d83
Compare
Codecov Report
@@ Coverage Diff @@
## master #39095 +/- ##
=========================================
Coverage ? 36.99%
=========================================
Files ? 612
Lines ? 45390
Branches ? 0
=========================================
Hits ? 16794
Misses ? 26317
Partials ? 2279 |
|
Updated the test to the ltsc2019 servercore image which should exist for a long time. |
There was a problem hiding this comment.
Shouldn't this produce the other error though?
Lines 154 to 160 in fc01c2b
There was a problem hiding this comment.
It actually shows this error when the image in the registry is a manifest list.
Line 759 in 50e63ad
There was a problem hiding this comment.
Hm... looks like a bug in that detection then; wondering: could we fix that?
Was the previous image not multi-arch?
There was a problem hiding this comment.
Actually; for this test we're only checking that the pull fails, so I guess it's ok (we might want to check for no matching manifest for linux perhaps?)
There was a problem hiding this comment.
Excellent idea so we don't need a new test for #38574 :-)
I'll add it, but also the no matching manifest for windows in the corresponding test for Windows.
Signed-off-by: Stefan Scherer <[email protected]>
a147d83 to
aad7e97
Compare
| 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") |
There was a problem hiding this comment.
When I try this with docker-ce 19.03.0-beta1 on a linux machine:
$ docker pull mcr.microsoft.com/windows/servercore:ltsc2019
ltsc2019: Pulling from windows/servercore
no matching manifest for linux/amd64 in the manifest list entries
However, when I try this on docker for mac with docker-ce 18.09.3 engine:
$ docker pull mcr.microsoft.com/windows/servercore:ltsc2019
ltsc2019: Pulling from windows/servercore
no matching manifest for unknown in the manifest list entries
There was a problem hiding this comment.
I think this PR is good to go if expecting the arch in the error message is the right thing to expect.
There was a problem hiding this comment.
Seeing the same on Docker for Mac, so looks like there might be an issue there (or perhaps something we fixed since?)
There was a problem hiding this comment.
PR #38574 that fixes that unknown message doesn't have a 18.09 tag, so it comes with 19.03
There was a problem hiding this comment.
Ah, right! I knew there was one; let me have a look at backporting it to 18.09
cpuguy83
left a comment
There was a problem hiding this comment.
LGTM... though it may be nice to have a fake non-matching image in a local registry...
- What I did
Fix the test TestPullWindowsImageFailsOnLinux as the latest tag is no longer available as seen in https://jenkins.dockerproject.org/job/Docker-PRs/53794/console
Also improve the tests to check
no matching manifest for ...does not containunknown.- How I did it
- How to verify it
make test-integration
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
the animal is invisible as the latest tag