diff --git a/tests/unit/repo.bats b/tests/unit/repo.bats index 9df856052..960836908 100644 --- a/tests/unit/repo.bats +++ b/tests/unit/repo.bats @@ -4,11 +4,9 @@ load test_helper setup() { global_setup - deploy_app } teardown() { - destroy_app global_teardown } @@ -27,11 +25,21 @@ teardown() { } @test "(repo) repo:gc, repo:purge-cache" { + run deploy_app + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku repo:gc $TEST_APP" echo "output: $output" echo "status: $status" assert_success + run /bin/bash -c "touch $DOKKU_ROOT/$TEST_APP/cache/derp" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" echo "output: $output" echo "status: $status" @@ -44,4 +52,9 @@ teardown() { echo "output: $output" echo "status: $status" assert_success + + run destroy_app + echo "output: $output" + echo "status: $status" + assert_success }