add tests for repo commands

This commit is contained in:
Michael Hobbs
2016-04-26 15:48:09 -07:00
parent 2c1f32199a
commit 48965e05bd

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
}