Merge pull request #4913 from vvoland/v25-4867

[25.0 backport] Test fixes needed for upgrading ci runners and engine
This commit is contained in:
Sebastiaan van Stijn 2024-03-04 12:49:50 +01:00 committed by GitHub
commit 0b9bf6a6f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 7 deletions

View File

@ -146,6 +146,6 @@ func TestRunWithCgroupNamespace(t *testing.T) {
environment.SkipIfCgroupNamespacesNotSupported(t)
result := icmd.RunCommand("docker", "run", "--cgroupns=private", "--rm", fixtures.AlpineImage,
"/bin/grep", "-q", "':memory:/$'", "/proc/1/cgroup")
"cat", "/sys/fs/cgroup/cgroup.controllers")
result.Assert(t, icmd.Success)
}

View File

@ -48,7 +48,14 @@ func TestBuildFromContextDirectoryWithTag(t *testing.T) {
3: output.Suffix("Step 2/4 : COPY run /usr/bin/run"),
5: output.Suffix("Step 3/4 : RUN run"),
7: output.Suffix("running"),
8: output.Contains("Removing intermediate container"),
// TODO(krissetto): ugly, remove when no longer testing against moby 24. see https://github.com/moby/moby/pull/46270
8: func(s string) error {
err := output.Contains("Removed intermediate container")(s) // moby >= v25
if err == nil {
return nil
}
return output.Contains("Removing intermediate container")(s) // moby < v25
},
10: output.Suffix("Step 4/4 : COPY data /data"),
12: output.Contains("Successfully built "),
13: output.Suffix("Successfully tagged myimage:latest"),