summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-10-03 11:35:13 -0700
committerGitHub <noreply@github.com>2018-10-03 11:35:13 -0700
commit3750b35ae2a22e7f7bc0070c5c2dadf1ef437074 (patch)
treec5eee413a0cd57375f464084581704fc6bd22b00 /test/e2e/libpod_suite_test.go
parent2a3e3e7f25d9a7bbe5e6f3f35027ccbe6521961f (diff)
parent14473270d7af520dae006605ab798ad9db34f184 (diff)
downloadpodman-3750b35ae2a22e7f7bc0070c5c2dadf1ef437074.tar.gz
podman-3750b35ae2a22e7f7bc0070c5c2dadf1ef437074.tar.bz2
podman-3750b35ae2a22e7f7bc0070c5c2dadf1ef437074.zip
Merge pull request #1578 from baude/addubuntuci
Add Ubuntu-18.04 to CI testing
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 485b14ba5..d521632d7 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -63,6 +63,7 @@ type PodmanTest struct {
ArtifactPath string
TempDir string
CgroupManager string
+ Host HostOS
}
// HostOS is a simple struct for the test os
@@ -126,6 +127,7 @@ func CreateTempDirInTempDir() (string, error) {
// PodmanCreate creates a PodmanTest instance for the tests
func PodmanCreate(tempDir string) PodmanTest {
+ host := GetHostDistributionInfo()
cwd, _ := os.Getwd()
podmanBinary := filepath.Join(cwd, "../../bin/podman")
@@ -149,7 +151,19 @@ func PodmanCreate(tempDir string) PodmanTest {
cgroupManager = os.Getenv("CGROUP_MANAGER")
}
- runCBinary := "/usr/bin/runc"
+ // Ubuntu doesn't use systemd cgroups
+ if host.Distribution == "ubuntu" {
+ 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"
+ }
+
CNIConfigDir := "/etc/cni/net.d"
p := PodmanTest{
@@ -164,6 +178,7 @@ func PodmanCreate(tempDir string) PodmanTest {
ArtifactPath: ARTIFACT_DIR,
TempDir: tempDir,
CgroupManager: cgroupManager,
+ Host: host,
}
// Setup registries.conf ENV variable