feat: implement application cloning
Application cloning can be used to setup review applications based on an existing application. This is useful in CI/CD pipelines where a developer may wish to verify code in a custom environment without overwriting a shared staging environment.
This commit is contained in:
@@ -90,3 +90,36 @@ teardown () {
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(apps) apps:clone" {
|
||||
deploy_app
|
||||
run bash -c "dokku apps:clone $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_success
|
||||
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
|
||||
|
||||
run bash -c "dokku apps:clone --skip-deploy $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "curl --silent --write-out '%{http_code}\n' `dokku url great-test-name` | grep 404"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
run bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user