fix: wrap all output and status variables in quotes

This will ensure newlines are replaced when these variables are output for debugging tests
This commit is contained in:
Jose Diaz-Gonzalez
2018-12-27 09:02:39 -05:00
parent 3656651cb9
commit 2fc51bcf53
26 changed files with 833 additions and 833 deletions

View File

@@ -19,91 +19,91 @@ teardown() {
@test "(plugin) plugin:install, plugin:disable, plugin:update plugin:uninstall" {
run /bin/bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO --name $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin:update $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "sudo -E -u nobody dokku plugin:uninstall $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_failure
run /bin/bash -c "dokku plugin:disable $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin | grep disabled | grep $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin:uninstall $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin | grep $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_failure
}
@test "(plugin) plugin:install plugin:update (with tag)" {
run /bin/bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO --committish v0.2.0 --name $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME | grep 0.2.0"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin:update $TEST_PLUGIN_NAME v0.3.0"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME | grep 0.2.0"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_failure
run /bin/bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME | grep 0.3.0"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
}
@test "(plugin) plugin:install, plugin:disable, plugin:uninstall as non-root user failure" {
run /bin/bash -c "sudo -E -u nobody dokku plugin:install $TEST_PLUGIN_GIT_REPO"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_failure
run /bin/bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "sudo -E -u nobody dokku plugin:disable $TEST_PLUGIN_NAME"
echo "output: "$output
echo "status: "$status
echo "output: $output"
echo "status: $status"
assert_failure
}