aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/podman_networking.bats21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/podman_networking.bats b/test/podman_networking.bats
index ba30a9897..b2196b4bc 100644
--- a/test/podman_networking.bats
+++ b/test/podman_networking.bats
@@ -27,3 +27,24 @@ function setup() {
echo "$output"
[ "$status" -eq 0 ]
}
+
+@test "expose port 222" {
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -dt --expose 222-223 ${ALPINE} /bin/sh
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "iptables -t nat -L"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "iptables -t nat -L | grep 223"
+ echo "$output"
+ [ "$status" -eq 0 ]
+}
+
+@test "expose host port 80 to container port 8000" {
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -dt -p 80:8000 ${ALPINE} /bin/sh
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "iptables -t nat -L | grep 8000"
+ echo "$output"
+ [ "$status" -eq 0 ]
+}