1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Description: Avoid running tests that need escalated permissions since this is not possible in
our build environment
Author: Nilesh Patra <nilesh@debian.org>
Forwarded: not-needed
Last-Update: 2022-02-18
--- a/pkg/util/archive/copy_test.go
+++ b/pkg/util/archive/copy_test.go
@@ -21,11 +21,6 @@
return CopyWithTar(src, dst, false)
}
- t.Run("privileged", func(t *testing.T) {
- test.EnsurePrivilege(t)
- testCopy(t, copyFunc)
- })
-
t.Run("unprivileged", func(t *testing.T) {
test.DropPrivilege(t)
defer test.ResetPrivilege(t)
@@ -38,11 +33,6 @@
return CopyWithTarWithRoot(src, dst, dst, false)
}
- t.Run("privileged", func(t *testing.T) {
- test.EnsurePrivilege(t)
- testCopy(t, copyFunc)
- })
-
t.Run("unprivileged", func(t *testing.T) {
test.DropPrivilege(t)
defer test.ResetPrivilege(t)
--- a/pkg/util/capabilities/process_linux_test.go
+++ b/pkg/util/capabilities/process_linux_test.go
@@ -13,6 +13,7 @@
)
func TestGetProcess(t *testing.T) {
+ t.Skip("Skipping test as this needs privilege containers")
test.EnsurePrivilege(t)
runtime.LockOSThread()
@@ -51,6 +52,7 @@
}
func TestSetProcessEffective(t *testing.T) {
+ t.Skip("Skipping test as this needs privilege containers")
test.EnsurePrivilege(t)
runtime.LockOSThread()
|