From f23c1c297d39d97e517667b5c676e58800132449 Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Sat, 27 Feb 2021 21:52:03 +0800 Subject: [PATCH] pkg/archive: TestUntarParentPathPermissions requires root === RUN TestUntarParentPathPermissions archive_unix_test.go:171: assertion failed: error is not nil: chown /tmp/TestUntarParentPathPermissions694189715/foo: operation not permitted Signed-off-by: Shengjing Zhu --- pkg/archive/archive_unix_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/archive/archive_unix_test.go b/pkg/archive/archive_unix_test.go index 4eff66629c..6274744b61 100644 --- a/pkg/archive/archive_unix_test.go +++ b/pkg/archive/archive_unix_test.go @@ -160,6 +160,7 @@ func TestTarWithHardLinkAndRebase(t *testing.T) { // TestUntarParentPathPermissions is a regression test to check that missing // parent directories are created with the expected permissions func TestUntarParentPathPermissions(t *testing.T) { + skip.If(t, os.Getuid() != 0, "skipping test that requires root") buf := &bytes.Buffer{} w := tar.NewWriter(buf) err := w.WriteHeader(&tar.Header{Name: "foo/bar"})