diff options
author | baude <bbaude@redhat.com> | 2018-02-15 08:17:35 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-16 18:35:54 +0000 |
commit | 586bb86a2ac58056b0d0d23274fb98ec599b0908 (patch) | |
tree | 831019f054727e219c2bd11a083b0b10a90cd974 /test/e2e/libpod_suite_test.go | |
parent | bc1d25bb19c1664b5669c13d6ff2811571284d27 (diff) | |
download | podman-586bb86a2ac58056b0d0d23274fb98ec599b0908.tar.gz podman-586bb86a2ac58056b0d0d23274fb98ec599b0908.tar.bz2 podman-586bb86a2ac58056b0d0d23274fb98ec599b0908.zip |
Run podman inside a podman container
We should be able to run nested podman containers in particular
for our testing environment. i.e. eat our own dog food.
Some privileges had to be corrected in order for this to work
correctly.
Added a third papr target that runs podman tests inside podman. I
marked the test as not required right now as we get more confident
in the results
Signed-off-by: baude <bbaude@redhat.com>
Closes: #340
Approved by: rhatdan
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r-- | test/e2e/libpod_suite_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index afe91134e..c479a6cef 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -460,3 +460,23 @@ func (p *PodmanTest) BuildImage(dockerfile, imageName string) { session.Wait(120) Expect(session.ExitCode()).To(Equal(0)) } + +//GetHostDistribution returns the dist in string format. If the +//distribution cannot be determined, an empty string will be returned. +func (p *PodmanTest) GetHostDistribution() string { + content, err := ioutil.ReadFile("/etc/os-release") + if err != nil { + return "" + } + for _, line := range content { + if strings.HasPrefix(fmt.Sprintf("%s", line), "ID") { + fields := strings.Split(fmt.Sprintf("%s", line), "=") + if len(fields) < 2 { + return "" + } + return strings.Trim(fields[1], "\"") + + } + } + return "" +} |