add tests for repo commands

This commit is contained in:
Michael Hobbs committed 2016-06-09 20:05:19 -07:00
1 parent 2c1f32199a
commit 48965e05bd
1 file changed
+31
+31
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
}