tests: fix postdeploy test

This commit is contained in:
Jose Diaz-Gonzalez committed 2021-02-28 14:39:16 -05:00
1 parent f98e7702fb
commit 52a88d63ad
2 files changed
+3 -5

No files matched your search

+2 -2
View File
@@ -54,8 +54,8 @@ teardown() {
echo "output: $output" echo "output: $output"
echo "status: $status" echo "status: $status"
assert_success assert_success
assert_output_contains "touch /app/release.test" 2 assert_output_contains "touch /app/heroku-postdeploy.test"
assert_output_contains "python3 release.py" 2 assert_output_contains "python3 release.py"
} }
@test "(app-json) app.json scripts missing" { @test "(app-json) app.json scripts missing" {
+1 -3
View File
@@ -514,17 +514,15 @@ add_release_command() {
echo "release: touch /app/release.test" >>"$APP_REPO_DIR/Procfile" echo "release: touch /app/release.test" >>"$APP_REPO_DIR/Procfile"
} }
add_postdeploy_command() { add_postdeploy_command() {
local APP="$1" local APP="$1"
local APP_REPO_DIR="$2" local APP_REPO_DIR="$2"
[[ -z "$APP" ]] && local APP="$TEST_APP" [[ -z "$APP" ]] && local APP="$TEST_APP"
touch "$APP_REPO_DIR/app.json" touch "$APP_REPO_DIR/app.json"
contents=$(jq '.scripts.postdeploy = "touch /app/heroku-postdeploy.test"' "$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() { add_requirements_txt() {
local APP="$1" local APP="$1"
local APP_REPO_DIR="$2" local APP_REPO_DIR="$2"