Skip to content

Commit

Permalink
Remove Docker incompat from image prune and build tests
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
  • Loading branch information
austinvazquez committed Aug 22, 2024
1 parent 439086f commit 6362afc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion cmd/nerdctl/builder_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ RUN ["cat", "/hello_from_dir2.txt"]`, testutil.CommonImage, filename)
// https://github.com/docker/buildx/pull/1482
func TestBuildSourceDateEpoch(t *testing.T) {
testutil.RequiresBuild(t)
testutil.DockerIncompatible(t) // Needs buildx v0.10 (https://github.com/docker/buildx/pull/1489)
base := testutil.NewBase(t)
imageName := testutil.Identifier(t)
defer base.Cmd("rmi", imageName).AssertOK()
Expand Down
6 changes: 3 additions & 3 deletions cmd/nerdctl/image_prune_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ func TestImagePruneFilterUntil(t *testing.T) {
testutil.RequiresBuild(t)
testutil.RegisterBuildCacheCleanup(t)

// Docker image's created timestamp is set based on base image creation time.
testutil.DockerIncompatible(t)

base := testutil.NewBase(t)
// For deterministically testing the filter, set the image's created timestamp to 2 hours in the past.
base.Env = append(base.Env, fmt.Sprintf("SOURCE_DATE_EPOCH=%d", time.Now().Add(-2*time.Hour).Unix()))

imageName := testutil.Identifier(t)
teardown := func() {
// Image should have been pruned; but cleanup on failure.
Expand Down

0 comments on commit 6362afc

Please sign in to comment.