diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/common_test.go | 20 | ||||
-rw-r--r-- | test/e2e/libpod_suite_remoteclient_test.go | 2 | ||||
-rw-r--r-- | test/e2e/libpod_suite_test.go | 2 | ||||
-rw-r--r-- | test/e2e/run_signal_test.go | 6 |
4 files changed, 17 insertions, 13 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 308a6bf29..b22ead3fa 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -34,7 +34,7 @@ type PodmanTestIntegration struct { ConmonBinary string CrioRoot string CNIConfigDir string - RunCBinary string + OCIRuntime string RunRoot string StorageOptions string SignaturePolicyPath string @@ -136,12 +136,16 @@ func PodmanTestCreateUtil(tempDir string, remote bool) *PodmanTestIntegration { cgroupManager = "cgroupfs" } - runCBinary, err := exec.LookPath("runc") - // If we cannot find the runc binary, setting to something static as we have no way - // to return an error. The tests will fail and point out that the runc binary could - // not be found nicely. - if err != nil { - runCBinary = "/usr/bin/runc" + ociRuntime := os.Getenv("OCI_RUNTIME") + if ociRuntime == "" { + var err error + ociRuntime, err = exec.LookPath("runc") + // If we cannot find the runc binary, setting to something static as we have no way + // to return an error. The tests will fail and point out that the runc binary could + // not be found nicely. + if err != nil { + ociRuntime = "/usr/bin/runc" + } } CNIConfigDir := "/etc/cni/net.d" @@ -156,7 +160,7 @@ func PodmanTestCreateUtil(tempDir string, remote bool) *PodmanTestIntegration { ConmonBinary: conmonBinary, CrioRoot: filepath.Join(tempDir, "crio"), CNIConfigDir: CNIConfigDir, - RunCBinary: runCBinary, + OCIRuntime: ociRuntime, RunRoot: filepath.Join(tempDir, "crio-run"), StorageOptions: storageOptions, SignaturePolicyPath: filepath.Join(INTEGRATION_ROOT, "test/policy.json"), diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go index 4b769a574..e6bc00397 100644 --- a/test/e2e/libpod_suite_remoteclient_test.go +++ b/test/e2e/libpod_suite_remoteclient_test.go @@ -164,7 +164,7 @@ func (p *PodmanTestIntegration) makeOptions(args []string) []string { //MakeOptions assembles all the podman main options func getVarlinkOptions(p *PodmanTestIntegration, args []string) []string { podmanOptions := strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s --cgroup-manager %s", - p.CrioRoot, p.RunRoot, p.RunCBinary, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager), " ") + p.CrioRoot, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager), " ") if os.Getenv("HOOK_OPTION") != "" { podmanOptions = append(podmanOptions, os.Getenv("HOOK_OPTION")) } diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 1f218cbdf..4b4baa93c 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -207,7 +207,7 @@ func PodmanTestCreate(tempDir string) *PodmanTestIntegration { //MakeOptions assembles all the podman main options func (p *PodmanTestIntegration) makeOptions(args []string) []string { podmanOptions := strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s --cgroup-manager %s", - p.CrioRoot, p.RunRoot, p.RunCBinary, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager), " ") + p.CrioRoot, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager), " ") if os.Getenv("HOOK_OPTION") != "" { podmanOptions = append(podmanOptions, os.Getenv("HOOK_OPTION")) } diff --git a/test/e2e/run_signal_test.go b/test/e2e/run_signal_test.go index 9be8e7810..51c14602e 100644 --- a/test/e2e/run_signal_test.go +++ b/test/e2e/run_signal_test.go @@ -55,7 +55,7 @@ var _ = Describe("Podman run with --sig-proxy", func() { _, pid := podmanTest.PodmanPID([]string{"run", "-it", "-v", fmt.Sprintf("%s:/h:Z", udsDir), fedoraMinimal, "bash", "-c", sigCatch}) - uds, _ := os.OpenFile(udsPath, os.O_RDONLY, 0600) + uds, _ := os.OpenFile(udsPath, os.O_RDONLY|syscall.O_NONBLOCK, 0600) defer uds.Close() // Wait for the script in the container to alert us that it is READY @@ -73,7 +73,7 @@ var _ = Describe("Podman run with --sig-proxy", func() { } time.Sleep(1 * time.Second) if counter == 15 { - os.Exit(1) + Fail("Timed out waiting for READY from container") } counter++ } @@ -99,7 +99,7 @@ var _ = Describe("Podman run with --sig-proxy", func() { } time.Sleep(1 * time.Second) if counter == 15 { - os.Exit(1) + Fail("timed out waiting for FOO from container") } counter++ } |