47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From 4622551eb4d29bee8fb30290368a4cce5af56737 Mon Sep 17 00:00:00 2001
|
|
From: Jamie Anderson <jamieand@amazon.com>
|
|
Date: Fri, 19 Mar 2021 20:10:01 +0000
|
|
Subject: [PATCH] Skip compression tests that require root
|
|
|
|
Signed-off-by: Jamie Anderson <jamieand@amazon.com>
|
|
---
|
|
cli/command/image/build/context_test.go | 2 ++
|
|
cli/command/image/build_test.go | 1 +
|
|
2 files changed, 3 insertions(+)
|
|
|
|
diff --git a/cli/command/image/build/context_test.go b/cli/command/image/build/context_test.go
|
|
index f216978..1dbea0b 100644
|
|
--- a/cli/command/image/build/context_test.go
|
|
+++ b/cli/command/image/build/context_test.go
|
|
@@ -10,6 +10,7 @@ import (
|
|
"runtime"
|
|
"strings"
|
|
"testing"
|
|
+ "github.com/docker/cli/testutil"
|
|
|
|
"github.com/docker/docker/pkg/archive"
|
|
"github.com/docker/docker/pkg/fileutils"
|
|
@@ -173,6 +174,7 @@ func TestGetContextFromReaderString(t *testing.T) {
|
|
}
|
|
|
|
func TestGetContextFromReaderTar(t *testing.T) {
|
|
+ testutil.RequiresRoot(t)
|
|
contextDir := createTestTempDir(t)
|
|
createTestTempFile(t, contextDir, DefaultDockerfileName, dockerfileContents)
|
|
|
|
diff --git a/cli/command/image/build_test.go b/cli/command/image/build_test.go
|
|
index cef80a3..34014dd 100644
|
|
--- a/cli/command/image/build_test.go
|
|
+++ b/cli/command/image/build_test.go
|
|
@@ -27,6 +27,7 @@ import (
|
|
)
|
|
|
|
func TestRunBuildDockerfileFromStdinWithCompress(t *testing.T) {
|
|
+ testutil.RequiresRoot(t)
|
|
defer env.Patch(t, "DOCKER_BUILDKIT", "0")()
|
|
buffer := new(bytes.Buffer)
|
|
fakeBuild := newFakeBuild()
|
|
--
|
|
2.31.0.rc2
|
|
|