Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit fed2677

Browse files
committed
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 <[email protected]> Upstream-commit: f23c1c297d39d97e517667b5c676e58800132449 Component: engine
1 parent 6dd96af commit fed2677

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/engine/pkg/archive/archive_unix_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func TestTarWithHardLinkAndRebase(t *testing.T) {
160160
// TestUntarParentPathPermissions is a regression test to check that missing
161161
// parent directories are created with the expected permissions
162162
func TestUntarParentPathPermissions(t *testing.T) {
163+
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
163164
buf := &bytes.Buffer{}
164165
w := tar.NewWriter(buf)
165166
err := w.WriteHeader(&tar.Header{Name: "foo/bar"})

0 commit comments

Comments
 (0)