From 52a88d63adeb42326a04bc5734377f4e2fff8cab Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 28 Feb 2021 14:36:45 -0500 Subject: [PATCH] tests: fix postdeploy test --- tests/unit/app-json.bats | 4 ++-- tests/unit/test_helper.bash | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/unit/app-json.bats b/tests/unit/app-json.bats index da66432a4..5e291a506 100644 --- a/tests/unit/app-json.bats +++ b/tests/unit/app-json.bats @@ -54,8 +54,8 @@ teardown() { echo "output: $output" echo "status: $status" assert_success - assert_output_contains "touch /app/release.test" 2 - assert_output_contains "python3 release.py" 2 + assert_output_contains "touch /app/heroku-postdeploy.test" + assert_output_contains "python3 release.py" } @test "(app-json) app.json scripts missing" { diff --git a/tests/unit/test_helper.bash b/tests/unit/test_helper.bash index 7d68ec34e..d6d37ed6d 100644 --- a/tests/unit/test_helper.bash +++ b/tests/unit/test_helper.bash @@ -514,17 +514,15 @@ add_release_command() { echo "release: touch /app/release.test" >>"$APP_REPO_DIR/Procfile" } - add_postdeploy_command() { local APP="$1" local APP_REPO_DIR="$2" [[ -z "$APP" ]] && local APP="$TEST_APP" touch "$APP_REPO_DIR/app.json" contents=$(jq '.scripts.postdeploy = "touch /app/heroku-postdeploy.test"' "$APP_REPO_DIR/app.json") - echo "${contents}" > "$APP_REPO_DIR/app.json" + echo "${contents}" >"$APP_REPO_DIR/app.json" } - add_requirements_txt() { local APP="$1" local APP_REPO_DIR="$2"