mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
add tests for repo commands
This commit is contained in:
31
tests/unit/10_repo.bats
Normal file
31
tests/unit/10_repo.bats
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user