refactor: wrap all 'run dokku' calls in /bin/bash calls
This commit is contained in:
commit
3656651cb9
27 files changed
+314
-315
No files matched your search
+41
-41
@@ -11,41 +11,41 @@ teardown () {
|
||||
}
|
||||
|
||||
@test "(apps) apps:create" {
|
||||
run dokku apps:create $TEST_APP
|
||||
run /bin/bash -c "dokku apps:create $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:list | grep $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output $TEST_APP
|
||||
destroy_app
|
||||
|
||||
run dokku apps:create 1994testapp
|
||||
run /bin/bash -c "dokku apps:create 1994testapp"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run dokku apps:create testapp:latest
|
||||
run /bin/bash -c "dokku apps:create testapp:latest"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
run dokku apps:create testApp:latest
|
||||
run /bin/bash -c "dokku apps:create testApp:latest"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
run dokku apps:create TestApp
|
||||
run /bin/bash -c "dokku apps:create TestApp"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
run bash -c "dokku --app $TEST_APP apps:create"
|
||||
run /bin/bash -c "dokku --app $TEST_APP apps:create"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:list | grep $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output $TEST_APP
|
||||
@@ -54,7 +54,7 @@ teardown () {
|
||||
}
|
||||
|
||||
@test "(apps) app autocreate disabled" {
|
||||
run dokku config:set --no-restart --global DOKKU_DISABLE_APP_AUTOCREATION='true'
|
||||
run /bin/bash -c "dokku config:set --no-restart --global DOKKU_DISABLE_APP_AUTOCREATION='true'"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -63,18 +63,18 @@ teardown () {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
run dokku config:unset --no-restart --global DOKKU_DISABLE_APP_AUTOCREATION
|
||||
run /bin/bash -c "dokku config:unset --no-restart --global DOKKU_DISABLE_APP_AUTOCREATION"
|
||||
}
|
||||
|
||||
@test "(apps) apps:destroy" {
|
||||
create_app
|
||||
run bash -c "dokku --force apps:destroy $TEST_APP"
|
||||
run /bin/bash -c "dokku --force apps:destroy $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
create_app
|
||||
run bash -c "dokku --force --app $TEST_APP apps:destroy"
|
||||
run /bin/bash -c "dokku --force --app $TEST_APP apps:destroy"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -82,32 +82,32 @@ teardown () {
|
||||
|
||||
@test "(apps) apps:rename" {
|
||||
deploy_app
|
||||
run bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
run /bin/bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:list | 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"
|
||||
run /bin/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"
|
||||
run /bin/bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run dokku apps:create $TEST_APP
|
||||
run /bin/bash -c "dokku apps:create $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
run /bin/bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku --force apps:destroy great-test-name"
|
||||
run /bin/bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -116,11 +116,11 @@ teardown () {
|
||||
@test "(apps) apps:rename with tls" {
|
||||
setup_test_tls
|
||||
deploy_app
|
||||
run bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
run /bin/bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku --force apps:destroy great-test-name"
|
||||
run /bin/bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -128,19 +128,19 @@ teardown () {
|
||||
|
||||
@test "(apps) apps:clone" {
|
||||
deploy_app
|
||||
run bash -c "dokku apps:clone $TEST_APP great-test-name"
|
||||
run /bin/bash -c "dokku apps:clone $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:list | 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"
|
||||
run /bin/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"
|
||||
run /bin/bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -148,15 +148,15 @@ teardown () {
|
||||
|
||||
@test "(apps) apps:clone --skip-deploy" {
|
||||
deploy_app
|
||||
run bash -c "dokku apps:clone --skip-deploy $TEST_APP great-test-name"
|
||||
run /bin/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"
|
||||
run /bin/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"
|
||||
run /bin/bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -164,33 +164,33 @@ teardown () {
|
||||
|
||||
@test "(apps) apps:clone --ignore-existing" {
|
||||
deploy_app
|
||||
run bash -c "dokku apps:create great-test-name"
|
||||
run /bin/bash -c "dokku apps:create great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku apps:clone --ignore-existing $TEST_APP great-test-name"
|
||||
run /bin/bash -c "dokku apps:clone --ignore-existing $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku --force apps:destroy great-test-name"
|
||||
run /bin/bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(apps) apps:exists" {
|
||||
run dokku apps:exists $TEST_APP
|
||||
run /bin/bash -c "dokku apps:exists $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
create_app
|
||||
run dokku apps:exists $TEST_APP
|
||||
run /bin/bash -c "dokku apps:exists $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku --force apps:destroy $TEST_APP"
|
||||
run /bin/bash -c "dokku --force apps:destroy $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -200,37 +200,37 @@ teardown () {
|
||||
@test "(apps) apps:lock/locked/unlock" {
|
||||
create_app
|
||||
|
||||
run bash -c "dokku apps:report $TEST_APP --locked"
|
||||
run /bin/bash -c "dokku apps:report $TEST_APP --locked"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output "false"
|
||||
|
||||
run bash -c "dokku apps:locked $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:locked $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
run bash -c "dokku apps:lock $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:lock $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku apps:report $TEST_APP --locked"
|
||||
run /bin/bash -c "dokku apps:report $TEST_APP --locked"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output "true"
|
||||
|
||||
run bash -c "dokku apps:locked $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:locked $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku apps:unlock $TEST_APP"
|
||||
run /bin/bash -c "dokku apps:unlock $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku apps:report $TEST_APP --locked"
|
||||
run /bin/bash -c "dokku apps:report $TEST_APP --locked"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output "false"
|
||||
|
||||
Reference in new issue
Block a user