c8d: test a backend dependent error on pull
moby and containerd have slightly different error messages when someone tries to pull an image that doesn't contain the current platform, instead of looking inside the error returned by containerd we match the errors in the test related to what image backend we are using Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
parent
7cfb81ba04
commit
3936c57294
1 changed files with 7 additions and 1 deletions
|
@ -285,5 +285,11 @@ func (s *DockerCLIPullSuite) TestPullLinuxImageFailsOnWindows(c *testing.T) {
|
|||
func (s *DockerCLIPullSuite) TestPullWindowsImageFailsOnLinux(c *testing.T) {
|
||||
testRequires(c, DaemonIsLinux, Network)
|
||||
_, _, err := dockerCmdWithError("pull", "mcr.microsoft.com/windows/servercore:ltsc2022")
|
||||
assert.ErrorContains(c, err, "no matching manifest for linux")
|
||||
|
||||
errorMessage := "no matching manifest for linux"
|
||||
if testEnv.UsingSnapshotter() {
|
||||
errorMessage = "no match for platform in manifest"
|
||||
}
|
||||
|
||||
assert.ErrorContains(c, err, errorMessage)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue