diff --git a/tests/unit/10_repo.bats b/tests/unit/10_repo.bats new file mode 100644 index 000000000..86ef4888b --- /dev/null +++ b/tests/unit/10_repo.bats @@ -0,0 +1,31 @@ +#!/usr/bin/env bats + +load test_helper + +setup() { + deploy_app +} + +teardown() { + destroy_app +} + +@test "(repo) repo:gc, repo:purge-cache" { + run dokku repo:gc $TEST_APP + echo "output: "$output + echo "status: "$status + assert_success + + run bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" + echo "output: "$output + echo "status: "$status + assert_failure + run dokku repo:purge-cache $TEST_APP + echo "output: "$output + echo "status: "$status + assert_success + run bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" + echo "output: "$output + echo "status: "$status + assert_success +}