Merge pull request #2050 from dokku/1570-repo-plugin

Implement repo:gc and repo:purge-cache
This commit is contained in:
Michael Hobbs
2016-06-16 12:42:25 -07:00
committed by GitHub
6 changed files with 102 additions and 1 deletions

31
tests/unit/10_repo.bats Normal file
View File

@@ -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
}