summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2019-03-05 16:11:28 -0700
committerJhon Honce <jhonce@redhat.com>2019-04-09 11:55:26 -0700
commit09ff62429a324e01ad2c584afe9a5f66f580ae78 (patch)
tree6c896a4071b4c0df0d6ae4f95f171b6596d4367a /test/e2e/libpod_suite_test.go
parentfe79bdd07e140176dc64ebef8da3eea2ae28b96b (diff)
downloadpodman-09ff62429a324e01ad2c584afe9a5f66f580ae78.tar.gz
podman-09ff62429a324e01ad2c584afe9a5f66f580ae78.tar.bz2
podman-09ff62429a324e01ad2c584afe9a5f66f580ae78.zip
Implement podman-remote rm
* refactor command output to use one function * Add new worker pool parallel operations * Implement podman-remote umount * Refactored podman wait to use printCmdOutput() Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 685a08340..a69c1ba9a 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -61,9 +61,12 @@ func (p *PodmanTestIntegration) PodmanPID(args []string) (*PodmanSessionIntegrat
func (p *PodmanTestIntegration) Cleanup() {
// Remove all containers
stopall := p.Podman([]string{"stop", "-a", "--timeout", "0"})
- stopall.WaitWithDefaultTimeout()
+ // stopall.WaitWithDefaultTimeout()
+ stopall.Wait(90)
+
session := p.Podman([]string{"rm", "-fa"})
session.Wait(90)
+
// Nuke tempdir
if err := os.RemoveAll(p.TempDir); err != nil {
fmt.Printf("%q\n", err)
@@ -141,7 +144,7 @@ func (p *PodmanTestIntegration) CreatePod(name string) (*PodmanSessionIntegratio
return session, session.ExitCode(), session.OutputToString()
}
-//RunTopContainer runs a simple container in the background that
+// RunTopContainer runs a simple container in the background that
// runs top. If the name passed != "", it will have a name
func (p *PodmanTestIntegration) RunTopContainer(name string) *PodmanSessionIntegration {
var podmanArgs = []string{"run"}
@@ -161,7 +164,7 @@ func (p *PodmanTestIntegration) RunTopContainerInPod(name, pod string) *PodmanSe
return p.Podman(podmanArgs)
}
-//RunLsContainer runs a simple container in the background that
+// RunLsContainer runs a simple container in the background that
// simply runs ls. If the name passed != "", it will have a name
func (p *PodmanTestIntegration) RunLsContainer(name string) (*PodmanSessionIntegration, int, string) {
var podmanArgs = []string{"run"}
@@ -215,13 +218,19 @@ func PodmanTestCreate(tempDir string) *PodmanTestIntegration {
return PodmanTestCreateUtil(tempDir, false)
}
-//MakeOptions assembles all the podman main options
+// 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 --tmpdir %s",
- p.CrioRoot, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager, p.TmpDir), " ")
+ var debug string
+ if _, ok := os.LookupEnv("DEBUG"); ok {
+ debug = "--log-level=debug --syslog=true "
+ }
+
+ podmanOptions := strings.Split(fmt.Sprintf("%s--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s --cgroup-manager %s --tmpdir %s",
+ debug, p.CrioRoot, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager, p.TmpDir), " ")
if os.Getenv("HOOK_OPTION") != "" {
podmanOptions = append(podmanOptions, os.Getenv("HOOK_OPTION"))
}
+
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
podmanOptions = append(podmanOptions, args...)
return podmanOptions