summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2018-03-07 11:38:04 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-08 07:23:16 +0000
commit5ac9294a79aa6fa9e91a1a05fd6b3a70b9eb8b8d (patch)
tree4aca4d9ca6914fff27ea7c8621c33159224c22d2 /test
parent4344639508ccd16041d1ec7fd531b6427f930374 (diff)
downloadpodman-5ac9294a79aa6fa9e91a1a05fd6b3a70b9eb8b8d.tar.gz
podman-5ac9294a79aa6fa9e91a1a05fd6b3a70b9eb8b8d.tar.bz2
podman-5ac9294a79aa6fa9e91a1a05fd6b3a70b9eb8b8d.zip
Add toggle for Docker install/deinstall for baseline test
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #461 Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r--test/test_podman_baseline.sh38
1 files changed, 27 insertions, 11 deletions
diff --git a/test/test_podman_baseline.sh b/test/test_podman_baseline.sh
index 55cda53ae..cd8cc3b4f 100644
--- a/test/test_podman_baseline.sh
+++ b/test/test_podman_baseline.sh
@@ -7,20 +7,30 @@
#
# To run this command:
#
+# /bin/bash -v test_podman_baseline.sh -d # Install and then deinstall Docker
# /bin/bash -v test_podman_baseline.sh -e # Stop on error
# /bin/bash -v test_podman_baseline.sh # Continue on error
#######
-# See if we want to stop on errors or not.
+# See if we want to stop on errors and/or install and then remove Docker.
#######
showerror=0
-while getopts "e" opt; do
+installdocker=0
+while getopts "de" opt; do
case "$opt" in
+ d) installdocker=1
+ ;;
e) showerror=1
;;
esac
done
+if [ "$installdocker" -eq 1 ]
+then
+ echo "Script will install and then deinstall Docker."
+ set -eu
+fi
+
if [ "$showerror" -eq 1 ]
then
echo "Script will stop on unexpected errors."
@@ -131,11 +141,14 @@ podman images
########
podman rm -a
-########
-# Install Docker, but not for long!
-########
-dnf -y install docker
-systemctl start docker
+if [ "$installdocker" -eq 1 ]
+then
+ ########
+ # Install Docker, but not for long!
+ ########
+ dnf -y install docker
+fi
+systemctl restart docker
########
# Push fedora-bashecho to the Docker daemon
@@ -147,10 +160,13 @@ podman push runecho docker-daemon:fedora-bashecho:latest
########
docker run fedora-bashecho ./tmp/runecho.sh
-########
-# Time to remove Docker
-########
-dnf -y remove docker
+if [ "$installdocker" -eq 1 ]
+then
+ ########
+ # Time to remove Docker
+ ########
+ dnf -y remove docker
+fi
########
# Build Dockerfile