Merge pull request #4352 from dokku/test-app-renames
Add a test for application renames
This commit is contained in:
@@ -7,7 +7,7 @@ cmd-plugin-trigger() {
|
||||
declare cmd="plugin:trigger"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
plugn trigger "$@"
|
||||
sudo -u dokku -E -H plugn trigger "$@"
|
||||
}
|
||||
|
||||
cmd-plugin-trigger "$@"
|
||||
|
||||
@@ -121,3 +121,33 @@ EOF
|
||||
echo "status: $status"
|
||||
assert_output "$test_restart_policy"
|
||||
}
|
||||
|
||||
@test "(ps:rebuild) old app name" {
|
||||
run /bin/bash -c "dokku --force apps:destroy $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
mkdir -p /home/dokku/test_app
|
||||
sudo chown -R dokku:dokku /home/dokku/test_app
|
||||
|
||||
run /bin/bash -c "dokku plugin:trigger post-create test_app"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku git:sync --build test_app https://github.com/dokku/smoke-test-app.git"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku ps:rebuild test_app"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku apps:rename test_app $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user