浏览代码

Merge pull request #42094 from zhsj/skip-test

pkg/archive: TestUntarParentPathPermissions requires root
Sebastiaan van Stijn 4 年之前
父节点
当前提交
a602b052a9
共有 1 个文件被更改,包括 1 次插入0 次删除
  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"})