summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-10-01 12:10:46 -0500
committerbaude <bbaude@redhat.com>2018-10-03 12:45:37 -0500
commit14473270d7af520dae006605ab798ad9db34f184 (patch)
tree3224b4b540df5adccc615f5adede8c3e3db7eb90 /test/e2e
parent230edff5216d0a7cedeff06c891450f8691b5aa2 (diff)
downloadpodman-14473270d7af520dae006605ab798ad9db34f184.tar.gz
podman-14473270d7af520dae006605ab798ad9db34f184.tar.bz2
podman-14473270d7af520dae006605ab798ad9db34f184.zip
Add ability for ubuntu to be tested
unfortunately the papr CI system cannot test ubuntu as a VM; therefore, this PR still keeps travis. but it does include fixes that will be required for running on modern versions of ubuntu. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/libpod_suite_test.go17
-rw-r--r--test/e2e/run_cgroup_parent_test.go4
-rw-r--r--test/e2e/run_memory_test.go3
3 files changed, 21 insertions, 3 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
diff --git a/test/e2e/run_cgroup_parent_test.go b/test/e2e/run_cgroup_parent_test.go
index 00b8d952d..f266fafa4 100644
--- a/test/e2e/run_cgroup_parent_test.go
+++ b/test/e2e/run_cgroup_parent_test.go
@@ -45,7 +45,7 @@ var _ = Describe("Podman run with --cgroup-parent", func() {
Specify("no --cgroup-parent", func() {
cgroup := "/libpod_parent"
- if !containerized() {
+ if !containerized() && podmanTest.CgroupManager != "cgroupfs" {
cgroup = "/machine.slice"
}
run := podmanTest.Podman([]string{"run", fedoraMinimal, "cat", "/proc/self/cgroup"})
@@ -56,7 +56,7 @@ var _ = Describe("Podman run with --cgroup-parent", func() {
})
Specify("valid --cgroup-parent using slice", func() {
- if containerized() {
+ if containerized() || podmanTest.CgroupManager == "cgroupfs" {
Skip("Requires Systemd cgroup manager support")
}
cgroup := "aaaa.slice"
diff --git a/test/e2e/run_memory_test.go b/test/e2e/run_memory_test.go
index cc2b969a9..d1768138b 100644
--- a/test/e2e/run_memory_test.go
+++ b/test/e2e/run_memory_test.go
@@ -39,6 +39,9 @@ var _ = Describe("Podman run memory", func() {
})
It("podman run memory-reservation test", func() {
+ if podmanTest.Host.Distribution == "ubuntu" {
+ Skip("Unable to perform test on Ubuntu distributions due to memory management")
+ }
session := podmanTest.Podman([]string{"run", "--memory-reservation=40m", ALPINE, "cat", "/sys/fs/cgroup/memory/memory.soft_limit_in_bytes"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))