diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-19 09:49:34 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-19 15:01:51 +0100 |
commit | 66d21901252b2030d50708c89627d4e05a5d10a7 (patch) | |
tree | 6879098f41471d05773fb3bcaa7fa904cb492628 /test/e2e/libpod_suite_test.go | |
parent | 4ab7462adde0dff905e646cf4def54a2b2bc2804 (diff) | |
download | podman-66d21901252b2030d50708c89627d4e05a5d10a7.tar.gz podman-66d21901252b2030d50708c89627d4e05a5d10a7.tar.bz2 podman-66d21901252b2030d50708c89627d4e05a5d10a7.zip |
test: fix SkipIfRootless() helper
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r-- | test/e2e/libpod_suite_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
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 |