diff --git a/tests/unit/app-json.bats b/tests/unit/app-json.bats index 5e291a506..ef610184e 100644 --- a/tests/unit/app-json.bats +++ b/tests/unit/app-json.bats @@ -2,9 +2,11 @@ load test_helper setup_file() { - add-apt-repository --yes ppa:cncf-buildpacks/pack-cli - apt-get update - apt-get --yes install pack-cli + if ! command -v "pack" &>/dev/null; then + add-apt-repository --yes ppa:cncf-buildpacks/pack-cli + apt-get update + apt-get --yes install pack-cli + fi } setup() { @@ -48,7 +50,6 @@ teardown() { assert_success } - @test "(app-json) app.json scripts postdeploy" { run deploy_app python dokku@dokku.me:$TEST_APP add_postdeploy_command echo "output: $output" diff --git a/tests/unit/ps-cnb.bats b/tests/unit/ps-cnb.bats index b7045ee9a..7d98ba0a6 100644 --- a/tests/unit/ps-cnb.bats +++ b/tests/unit/ps-cnb.bats @@ -3,9 +3,11 @@ load test_helper setup_file() { - add-apt-repository --yes ppa:cncf-buildpacks/pack-cli - apt-get update - apt-get --yes install pack-cli + if ! command -v "pack" &>/dev/null; then + add-apt-repository --yes ppa:cncf-buildpacks/pack-cli + apt-get update + apt-get --yes install pack-cli + fi } setup() {