summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/e2e/libpod_suite_remoteclient_test.go9
-rw-r--r--test/e2e/libpod_suite_test.go10
2 files changed, 16 insertions, 3 deletions
diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go
index a964986a2..44c5edf07 100644
--- a/test/e2e/libpod_suite_remoteclient_test.go
+++ b/test/e2e/libpod_suite_remoteclient_test.go
@@ -18,7 +18,11 @@ func SkipIfRemote() {
ginkgo.Skip("This function is not enabled for remote podman")
}
-func SkipIfRootless() {}
+func SkipIfRootless() {
+ if os.Geteuid() != 0 {
+ ginkgo.Skip("This function is not enabled for remote podman")
+ }
+}
// Cleanup cleans up the temporary store
func (p *PodmanTestIntegration) Cleanup() {
@@ -135,6 +139,9 @@ func (p *PodmanTestIntegration) CleanupVolume() {
}
func PodmanTestCreate(tempDir string) *PodmanTestIntegration {
+ if os.Geteuid() != 0 {
+ ginkgo.Skip("This function is not enabled for rootless podman")
+ }
pti := PodmanTestCreateUtil(tempDir, true)
pti.StartVarlink()
return pti
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 3d8eb7a38..685a08340 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -20,10 +20,16 @@ import (
"github.com/onsi/gomega/gexec"
)
-func SkipIfRemote() {}
+func SkipIfRemote() {
+ if os.Geteuid() != 0 {
+ ginkgo.Skip("This function is not enabled for rootless podman")
+ }
+}
func SkipIfRootless() {
- ginkgo.Skip("This function is not enabled for rootless podman")
+ if os.Geteuid() != 0 {
+ ginkgo.Skip("This function is not enabled for rootless podman")
+ }
}
// Podman is the exec call to podman on the filesystem