summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-01-24 21:24:54 +0100
committerGitHub <noreply@github.com>2018-01-24 21:24:54 +0100
commit97f234190f9641dabecdefb05ffe52103621da90 (patch)
tree86dadf8512e8a34291c2f12c4ea4442070a01e12 /test
parent274908fd1349872cd1a661483c100e3a7a837da0 (diff)
parentb74e38b042cb32cead9adacbe75256a89e5cb664 (diff)
downloadpodman-97f234190f9641dabecdefb05ffe52103621da90.tar.gz
podman-97f234190f9641dabecdefb05ffe52103621da90.tar.bz2
podman-97f234190f9641dabecdefb05ffe52103621da90.zip
Merge pull request #252 from baude/port
podman port
Diffstat (limited to 'test')
-rw-r--r--test/podman_port.bats43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/podman_port.bats b/test/podman_port.bats
new file mode 100644
index 000000000..d13227b3c
--- /dev/null
+++ b/test/podman_port.bats
@@ -0,0 +1,43 @@
+#!/usr/bin/env bats
+
+load helpers
+
+function teardown() {
+ cleanup_test
+}
+
+function setup() {
+ copy_images
+}
+
+@test "podman port all and latest" {
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} port -a -l
+ echo "$output"
+ echo "$status"
+ [ "$status" -ne 0 ]
+}
+
+@test "podman port all and extra" {
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} port -a foobar
+ echo "$output"
+ echo "$status"
+ [ "$status" -ne 0 ]
+}
+
+@test "podman port nginx" {
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -dt -P docker.io/library/nginx:latest
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} port -l
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} port -l 80
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} port -l 80/tcp
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run ${PODMAN_BINARY} ${PODMAN_OPTIONS} port -a
+ echo "$output"
+ [ "$status" -eq 0 ]
+}