diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-04-09 01:36:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-09 01:36:53 -0700 |
commit | d744d9e3038aea2cf77ca83326be2f141da3b610 (patch) | |
tree | a407b434cdd1cc67a66f2983fbadbfe3e6dfcacd /test/e2e/libpod_suite_remoteclient_test.go | |
parent | 0fdbf1d306a806520257e100bb9f306e516fd8f0 (diff) | |
parent | ce82e19a372571f296e8463727809ee76c725911 (diff) | |
download | podman-d744d9e3038aea2cf77ca83326be2f141da3b610.tar.gz podman-d744d9e3038aea2cf77ca83326be2f141da3b610.tar.bz2 podman-d744d9e3038aea2cf77ca83326be2f141da3b610.zip |
Merge pull request #2859 from giuseppe/enable-userns-tests-rootless
test: enable userns and remote e2e tests for rootless
Diffstat (limited to 'test/e2e/libpod_suite_remoteclient_test.go')
-rw-r--r-- | test/e2e/libpod_suite_remoteclient_test.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go index 44c5edf07..a85d21a48 100644 --- a/test/e2e/libpod_suite_remoteclient_test.go +++ b/test/e2e/libpod_suite_remoteclient_test.go @@ -139,19 +139,21 @@ 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 } func (p *PodmanTestIntegration) StartVarlink() { - if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { + if os.Geteuid() == 0 { os.MkdirAll("/run/podman", 0755) } - args := []string{"varlink", "--timeout", "0", "unix:/run/podman/io.podman"} + varlinkEndpoint := "unix:/run/podman/io.podman" + if addr := os.Getenv("PODMAN_VARLINK_ADDRESS"); addr != "" { + varlinkEndpoint = addr + } + + args := []string{"varlink", "--timeout", "0", varlinkEndpoint} podmanOptions := getVarlinkOptions(p, args) command := exec.Command(p.PodmanBinary, podmanOptions...) fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " ")) |