summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_podman_baseline.sh34
1 files changed, 26 insertions, 8 deletions
diff --git a/test/test_podman_baseline.sh b/test/test_podman_baseline.sh
index 27c0c9178..8c4e5a86f 100755
--- a/test/test_podman_baseline.sh
+++ b/test/test_podman_baseline.sh
@@ -78,17 +78,25 @@ echo $image
########
# Run container and display contents in /etc
########
-podman run $image ls -alF /etc
+podman run --rm $image ls -alF /etc
########
-# Run Java in the container - should ERROR but never stop
+# Test networking, bind mounting a file, stdin/stdout redirect
########
-podman run $image java 2>&1 || echo $?
-
-########
-# Clean out containers
-########
-podman rm --all
+txt1="Hello, Podman"
+echo "$txt" > /tmp/hello.txt
+podman run -d --name myweb -p 8080:80 -w /var/www -v /tmp/hello.txt:/var/www/index.txt busybox httpd -f -p 80
+echo $txt | podman exec -i myweb sh -c "cat > /var/www/index2.txt"
+txt2=$( podman exec myweb cat /var/www/index2.txt )
+[ "x$txt1"=="x$txt2" ] && echo "PASS"
+txt2=$( podman run --rm --net host busybox wget -qO - http://localhost:8080/index.txt )
+[ "x$txt1"=="x$txt2" ] && echo "PASS"
+txt2=$( podman run --rm --net host busybox wget -qO - http://localhost:8080/index2.txt )
+[ "x$txt1"=="x$txt2" ] && echo "PASS"
+# poadman run --rm --net container:myweb --add-host myweb:127.0.0.1 busybox wget -qO - http://myweb/index.txt
+rm /tmp/hello.txt
+podman stop myweb
+podman rm myweb
########
# pull and run many containers in parallel, test locks ..etc.
@@ -137,6 +145,16 @@ count=$( podman ps -q | wc -l )
########
+# Run Java in the container - should ERROR but never stop
+########
+podman run $image java 2>&1 || echo $?
+
+########
+# Clean out containers
+########
+podman rm --all
+
+########
# Install java onto the container, commit it, then run it showing java usage
########
podman run --net=host $image dnf -y install java