diff options
author | Ed Santiago <santiago@redhat.com> | 2020-12-10 14:34:21 -0700 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-12-11 09:27:42 -0600 |
commit | f3e69d7300e3b4d6c5bb676c1dae27b10c3a4d56 (patch) | |
tree | 2b771250d2a6fddae65eeb230cef7cade90999b3 /test/compose/simple_port_map | |
parent | 82d7b9f2e21c93cfb12c8f199284c38f3e858280 (diff) | |
download | podman-f3e69d7300e3b4d6c5bb676c1dae27b10c3a4d56.tar.gz podman-f3e69d7300e3b4d6c5bb676c1dae27b10c3a4d56.tar.bz2 podman-f3e69d7300e3b4d6c5bb676c1dae27b10c3a4d56.zip |
test-compose: rewrite to new subdir form
...in which we use all-local tests
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/compose/simple_port_map')
-rw-r--r-- | test/compose/simple_port_map/frontend/app.py | 10 | ||||
-rw-r--r-- | test/compose/simple_port_map/setup.sh | 3 | ||||
-rw-r--r-- | test/compose/simple_port_map/teardown.sh | 4 | ||||
-rw-r--r-- | test/compose/simple_port_map/tests.sh | 3 |
4 files changed, 18 insertions, 2 deletions
diff --git a/test/compose/simple_port_map/frontend/app.py b/test/compose/simple_port_map/frontend/app.py index 895556a89..97b17c440 100644 --- a/test/compose/simple_port_map/frontend/app.py +++ b/test/compose/simple_port_map/frontend/app.py @@ -1,9 +1,15 @@ from flask import Flask +import os app = Flask(__name__) @app.route('/') def hello(): - return "Podman rulez!" + 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 + "--!" if __name__ == '__main__': - app.run(host='0.0.0.0') + 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 new file mode 100644 index 000000000..9004b1e76 --- /dev/null +++ b/test/compose/simple_port_map/setup.sh @@ -0,0 +1,3 @@ +# -*- 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 new file mode 100644 index 000000000..3f8153fa0 --- /dev/null +++ b/test/compose/simple_port_map/teardown.sh @@ -0,0 +1,4 @@ +# -*- 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 new file mode 100644 index 000000000..959b429d6 --- /dev/null +++ b/test/compose/simple_port_map/tests.sh @@ -0,0 +1,3 @@ +# -*- bash -*- + +test_port 5000 = "Podman rulez!--$ENV_PASSTHRU--!" |