diff options
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--!" |