diff --git a/tests/unit/10_apps.bats b/tests/unit/10_apps.bats index 8b489a903..e943d809e 100644 --- a/tests/unit/10_apps.bats +++ b/tests/unit/10_apps.bats @@ -217,6 +217,83 @@ teardown() { assert_success } +@test "(apps) apps:clone (no app)" { + run /bin/bash -c "dokku apps:create $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku buildpacks:add $TEST_APP https://github.com/heroku/heroku-buildpack-ruby.git" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku git:set $TEST_APP deploy-branch SOME_BRANCH_NAME" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku network:set $TEST_APP attach-post-create test-network" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku nginx:set $TEST_APP bind-address-ipv4 127.0.0.1" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku resource:limit --memory 100 $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku scheduler-docker-local:set $TEST_APP disable-chown true" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku apps:clone $TEST_APP great-test-name" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku apps:list | grep $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku buildpacks:report great-test-name --buildpacks-list" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "https://github.com/heroku/heroku-buildpack-ruby.git" + run /bin/bash -c "dokku git:report great-test-name --git-deploy-branch" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "SOME_BRANCH_NAME" + run /bin/bash -c "dokku network:report great-test-name --network-attach-post-create" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "test-network" + run /bin/bash -c "dokku nginx:report great-test-name --nginx-bind-address-ipv4" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "127.0.0.1" + run /bin/bash -c "dokku resource:report great-test-name --resource-_default_.limit.memory" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "100" + run /bin/bash -c "dokku scheduler-docker-local:report great-test-name --scheduler-docker-local-disable-chown" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "true" + + run /bin/bash -c "dokku --force apps:destroy great-test-name" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(apps) apps:clone ssl-app" { run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_PROXY_PORT_MAP=https:443:5000 DOKKU_PROXY_SSL_PORT=443" deploy_app