summaryrefslogtreecommitdiff
path: root/test/compose/simple_port_map
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-12-11 09:17:45 -0600
committerbaude <bbaude@redhat.com>2020-12-11 10:07:13 -0600
commitcb91bf96e02de8a6a7e50f83b4b69b9c47b84cc5 (patch)
tree46e3a7613d8893511bd8112653ea36258936d73c /test/compose/simple_port_map
parentf3e69d7300e3b4d6c5bb676c1dae27b10c3a4d56 (diff)
downloadpodman-cb91bf96e02de8a6a7e50f83b4b69b9c47b84cc5.tar.gz
podman-cb91bf96e02de8a6a7e50f83b4b69b9c47b84cc5.tar.bz2
podman-cb91bf96e02de8a6a7e50f83b4b69b9c47b84cc5.zip
add compose test descriptions
adding compose test descriptions and validations. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/compose/simple_port_map')
-rw-r--r--test/compose/simple_port_map/README.md9
-rw-r--r--test/compose/simple_port_map/frontend/app.py7
-rw-r--r--test/compose/simple_port_map/setup.sh3
-rw-r--r--test/compose/simple_port_map/teardown.sh4
-rw-r--r--test/compose/simple_port_map/tests.sh2
5 files changed, 11 insertions, 14 deletions
diff --git a/test/compose/simple_port_map/README.md b/test/compose/simple_port_map/README.md
new file mode 100644
index 000000000..f28d71c3e
--- /dev/null
+++ b/test/compose/simple_port_map/README.md
@@ -0,0 +1,9 @@
+simple port map to host
+===============
+
+This test creates a container that runs flask on and maps to the same
+host port
+
+Validation
+------------
+* curl http://localhost:5000 and verify message
diff --git a/test/compose/simple_port_map/frontend/app.py b/test/compose/simple_port_map/frontend/app.py
index 97b17c440..e4f84068c 100644
--- a/test/compose/simple_port_map/frontend/app.py
+++ b/test/compose/simple_port_map/frontend/app.py
@@ -4,12 +4,7 @@ app = Flask(__name__)
@app.route('/')
def hello():
- passthru = "ERROR: Could not get $ENV_PASSTHRU envariable"
- try:
- passthru = os.getenv("ENV_PASSTHRU")
- except Exception as e:
- passthru = passthru + ": " + str(e)
- return "Podman rulez!--" + passthru + "--!"
+ return "Podman rulez!"
if __name__ == '__main__':
app.run(host='0.0.0.0')
diff --git a/test/compose/simple_port_map/setup.sh b/test/compose/simple_port_map/setup.sh
deleted file mode 100644
index 9004b1e76..000000000
--- a/test/compose/simple_port_map/setup.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-# -*- bash -*-
-
-export ENV_PASSTHRU=$(random_string 20)
diff --git a/test/compose/simple_port_map/teardown.sh b/test/compose/simple_port_map/teardown.sh
deleted file mode 100644
index 3f8153fa0..000000000
--- a/test/compose/simple_port_map/teardown.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- bash -*-
-
-# FIXME: this is completely unnecessary; it's just an example of a teardown
-unset ENV_PASSTHRU
diff --git a/test/compose/simple_port_map/tests.sh b/test/compose/simple_port_map/tests.sh
index 959b429d6..ccb2b6a3d 100644
--- a/test/compose/simple_port_map/tests.sh
+++ b/test/compose/simple_port_map/tests.sh
@@ -1,3 +1,3 @@
# -*- bash -*-
-test_port 5000 = "Podman rulez!--$ENV_PASSTHRU--!"
+test_port 5000 = "Podman rulez!"