Adds unit test for new apps:rename function. Add example in the docs for new apps:rename function. Add apps:rename command to help command. Delete cache directory before copying old app directory to new app directory. deploy_app instead of create_app for apps:rename testing. Change app url to match new name. Fix unit tests. Add some more tests, plugn triggers.
49 lines
1.1 KiB
Bash
49 lines
1.1 KiB
Bash
#!/usr/bin/env bats
|
|
|
|
load test_helper
|
|
|
|
@test "(apps) apps" {
|
|
create_app
|
|
run bash -c "dokku apps | grep $TEST_APP"
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_output $TEST_APP
|
|
destroy_app
|
|
}
|
|
|
|
@test "(apps) apps:create" {
|
|
run dokku apps:create $TEST_APP
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_success
|
|
destroy_app
|
|
}
|
|
|
|
@test "(apps) apps:destroy" {
|
|
create_app
|
|
run bash -c "dokku --force apps:destroy $TEST_APP"
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_success
|
|
}
|
|
|
|
@test "(apps) apps:rename" {
|
|
deploy_app
|
|
run bash -c "dokku apps:rename $TEST_APP great-test-name"
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_success
|
|
run bash -c "dokku apps | grep $TEST_APP"
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_output ""
|
|
run bash -c "curl --silent --write-out '%{http_code}\n' `dokku url great-test-name` | grep 404"
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_output ""
|
|
run bash -c "dokku --force apps:destroy great-test-name"
|
|
echo "output: "$output
|
|
echo "status: "$status
|
|
assert_success
|
|
}
|