From 10f6d00e04c9bf972a5093b509e4734865f64d23 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 12 Aug 2021 16:16:08 -0400 Subject: [PATCH] tests: add test to ensure herokuish respects the env vars during the release process --- tests/unit/app-json.bats | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/unit/app-json.bats b/tests/unit/app-json.bats index 39f406bd9..37ce23bec 100644 --- a/tests/unit/app-json.bats +++ b/tests/unit/app-json.bats @@ -66,6 +66,26 @@ teardown() { assert_success } +@test "(app-json) app.json herokuish release" { + run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk" + echo "output: $output" + echo "status: $status" + assert_success + + run deploy_app python dokku@dokku.me:$TEST_APP add_requirements_txt + echo "output: $output" + echo "status: $status" + assert_success + assert_output_contains "Executing release task from Procfile" + assert_output_contains "SECRET_KEY: fjdkslafjdk" + + run /bin/bash -c "curl $(dokku url $TEST_APP)/env" + echo "output: $output" + echo "status: $status" + assert_success + assert_output_contains '"SECRET_KEY": "fjdkslafjdk"' +} + @test "(app-json) app.json cnb release" { run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk" echo "output: $output"