Skip to content

Commit

Permalink
Workaround and document weird docker issue
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <[email protected]>
  • Loading branch information
apostasie committed Oct 18, 2024
1 parent 9b1cf67 commit 5f004d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/nerdctl/container/container_commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func TestCommit(t *testing.T) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Setup: func(data test.Data, helpers test.Helpers) {
// FIXME: short of pulling first, docker will fail to start the container.
// Debugging shows container exited immediately. Nothing in the container logs. Not much in journalctl.
// It is not clear what is happening.
helpers.Ensure("pull", testutil.CommonImage)
helpers.Ensure("run", "-d", "--name", data.Identifier(), testutil.CommonImage, "sleep", "infinity")
nerdtest.EnsureContainerStarted(helpers, data.Identifier())
helpers.Ensure("exec", data.Identifier(), "sh", "-euxc", `echo hello-test-commit > /foo`)
Expand All @@ -59,6 +63,8 @@ func TestCommit(t *testing.T) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Setup: func(data test.Data, helpers test.Helpers) {
// See note above about docker failing.
helpers.Ensure("pull", testutil.CommonImage)
helpers.Ensure("run", "-d", "--name", data.Identifier(), testutil.CommonImage, "sleep", "infinity")
nerdtest.EnsureContainerStarted(helpers, data.Identifier())
helpers.Ensure("exec", data.Identifier(), "sh", "-euxc", `echo hello-test-commit > /foo`)
Expand Down

0 comments on commit 5f004d2

Please sign in to comment.