Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion cmd/nerdctl/image/image_convert_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ func TestImageConvert(t *testing.T) {
nerdtest.Soci,
nerdtest.SociVersion("0.10.0"),
),
Setup: func(data test.Data, helpers test.Helpers) {
// Clean up any existing SOCI indices to avoid stale ztoc data
helpers.Anyhow("rmi", "-f", testutil.CommonImage)
helpers.Anyhow("system", "prune", "--force")
helpers.Ensure("pull", "--quiet", "--all-platforms", testutil.CommonImage)
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier("converted-image"))
},
Expand All @@ -115,6 +121,12 @@ func TestImageConvert(t *testing.T) {
nerdtest.Soci,
nerdtest.SociVersion("0.10.0"),
),
Setup: func(data test.Data, helpers test.Helpers) {
// Clean up any existing SOCI indices to avoid stale ztoc data
helpers.Anyhow("rmi", "-f", testutil.CommonImage)
helpers.Anyhow("system", "prune", "--force")
helpers.Ensure("pull", "--quiet", "--all-platforms", testutil.CommonImage)
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier("converted-image"))
},
Expand All @@ -130,7 +142,6 @@ func TestImageConvert(t *testing.T) {
}

testCase.Run(t)

}

func TestImageConvertNydusVerify(t *testing.T) {
Expand Down
Loading