From 973313e3aaacfb472dfab945debe86d47ff574d3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 17 Feb 2020 22:12:15 -0500 Subject: [PATCH] tests: add tests for app renaming --- tests/unit/10_apps.bats | 59 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/tests/unit/10_apps.bats b/tests/unit/10_apps.bats index 0c3464224..8b489a903 100644 --- a/tests/unit/10_apps.bats +++ b/tests/unit/10_apps.bats @@ -117,10 +117,67 @@ teardown() { echo "output: $output" echo "status: $status" assert_success - run /bin/bash -c "dokku apps:rename $TEST_APP great-test-name" + + 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 --trace apps:rename $TEST_APP great-test-name" + 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"