diff --git a/tests/apps/python/second.Procfile b/tests/apps/python/second.Procfile index b03a168c7..66d57acc6 100644 --- a/tests/apps/python/second.Procfile +++ b/tests/apps/python/second.Procfile @@ -1 +1 @@ -web: python3 web.py +web: python3 web.py second.Procfile diff --git a/tests/apps/python/web.py b/tests/apps/python/web.py index e14bb903c..5d7a77953 100644 --- a/tests/apps/python/web.py +++ b/tests/apps/python/web.py @@ -22,6 +22,9 @@ if __name__ == "__main__": print("Failing on startup due to FAIL_ON_STARTUP=true") sys.exit(1) + for arg in sys.argv: + print(f"Arg: {arg}") + port = int(os.getenv("PORT", 5000)) server = http.server.HTTPServer(("0.0.0.0", port), GetHandler) print("Listening on port {0}".format(port)) diff --git a/tests/unit/ps-general-2.bats b/tests/unit/ps-general-2.bats index 0fc167f5b..55dc60e8c 100644 --- a/tests/unit/ps-general-2.bats +++ b/tests/unit/ps-general-2.bats @@ -95,6 +95,13 @@ teardown() { echo "status: $status" assert_success + run /bin/bash -c "dokku logs $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_output_contains "Arg: web.py" + assert_output_contains "Arg: second.Procfile" 0 + assert_success + run /bin/bash -c "dokku ps:set $TEST_APP procfile-path nonexistent-procfile" echo "output: $output" echo "status: $status" @@ -117,6 +124,13 @@ teardown() { assert_success assert_output_contains 'SECRET_KEY:' 0 + run /bin/bash -c "dokku logs $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_output_contains "Arg: web.py" + assert_output_contains "Arg: second.Procfile" + assert_success + run /bin/bash -c "dokku ps:set $TEST_APP procfile-path" echo "output: $output" echo "status: $status" @@ -127,6 +141,13 @@ teardown() { echo "status: $status" assert_success assert_output_contains 'SECRET_KEY:' + + run /bin/bash -c "dokku logs $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_output_contains "Arg: web.py" + assert_output_contains "Arg: second.Procfile" 0 + assert_success } @test "(ps:scale) remove zerod processes" {