Explorar o código

Merge pull request #42094 from zhsj/skip-test

pkg/archive: TestUntarParentPathPermissions requires root
Sebastiaan van Stijn %!s(int64=4) %!d(string=hai) anos
pai
achega
a602b052a9
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      pkg/archive/archive_unix_test.go

+ 1 - 0
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"})