diff --git a/plugins/builder-dockerfile/internal-functions b/plugins/builder-dockerfile/internal-functions index cce54dae7..e5c08e462 100755 --- a/plugins/builder-dockerfile/internal-functions +++ b/plugins/builder-dockerfile/internal-functions @@ -12,13 +12,15 @@ cmd-builder-dockerfile-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/builder-herokuish/internal-functions b/plugins/builder-herokuish/internal-functions index a5b16af24..be773b5de 100755 --- a/plugins/builder-herokuish/internal-functions +++ b/plugins/builder-herokuish/internal-functions @@ -12,13 +12,15 @@ cmd-builder-herokuish-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/builder-lambda/internal-functions b/plugins/builder-lambda/internal-functions index 832b156a5..fb5d6852b 100755 --- a/plugins/builder-lambda/internal-functions +++ b/plugins/builder-lambda/internal-functions @@ -12,13 +12,15 @@ cmd-builder-lambda-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/builder-nixpacks/internal-functions b/plugins/builder-nixpacks/internal-functions index 58ee7eea8..d68c00698 100755 --- a/plugins/builder-nixpacks/internal-functions +++ b/plugins/builder-nixpacks/internal-functions @@ -12,13 +12,15 @@ cmd-builder-nixpacks-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/builder-pack/internal-functions b/plugins/builder-pack/internal-functions index 74c806e48..b0a19f8ae 100755 --- a/plugins/builder-pack/internal-functions +++ b/plugins/builder-pack/internal-functions @@ -12,13 +12,15 @@ cmd-builder-pack-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/builder-railpack/internal-functions b/plugins/builder-railpack/internal-functions index b9c3fbf33..297a1bbb6 100755 --- a/plugins/builder-railpack/internal-functions +++ b/plugins/builder-railpack/internal-functions @@ -12,13 +12,15 @@ cmd-builder-railpack-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/caddy-vhosts/command-functions b/plugins/caddy-vhosts/command-functions index 231c5a4ad..351cf88e5 100755 --- a/plugins/caddy-vhosts/command-functions +++ b/plugins/caddy-vhosts/command-functions @@ -37,13 +37,15 @@ cmd-caddy-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/certs/internal-functions b/plugins/certs/internal-functions index cfda209bc..694cdfe49 100755 --- a/plugins/certs/internal-functions +++ b/plugins/certs/internal-functions @@ -12,13 +12,15 @@ cmd-certs-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/checks/internal-functions b/plugins/checks/internal-functions index 30dfe4c69..b2435bc22 100755 --- a/plugins/checks/internal-functions +++ b/plugins/checks/internal-functions @@ -13,13 +13,15 @@ cmd-checks-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/domains/internal-functions b/plugins/domains/internal-functions index f53335fba..1a050eeb7 100755 --- a/plugins/domains/internal-functions +++ b/plugins/domains/internal-functions @@ -12,15 +12,15 @@ cmd-domains-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ "$APP" == "--global" ]]; then - : - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" != "--global" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index eee315f7b..7434f36b0 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -327,13 +327,15 @@ cmd-git-report() { declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/haproxy-vhosts/command-functions b/plugins/haproxy-vhosts/command-functions index 3477abca1..20358ec13 100755 --- a/plugins/haproxy-vhosts/command-functions +++ b/plugins/haproxy-vhosts/command-functions @@ -37,13 +37,15 @@ cmd-haproxy-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/nginx-vhosts/command-functions b/plugins/nginx-vhosts/command-functions index b75eb711d..3b69ca868 100755 --- a/plugins/nginx-vhosts/command-functions +++ b/plugins/nginx-vhosts/command-functions @@ -15,13 +15,15 @@ cmd-nginx-report() { declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/openresty-vhosts/command-functions b/plugins/openresty-vhosts/command-functions index 1ddbe475c..09ad8f708 100755 --- a/plugins/openresty-vhosts/command-functions +++ b/plugins/openresty-vhosts/command-functions @@ -37,13 +37,15 @@ cmd-openresty-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/scheduler-docker-local/internal-functions b/plugins/scheduler-docker-local/internal-functions index 08426ac9a..056e9a086 100755 --- a/plugins/scheduler-docker-local/internal-functions +++ b/plugins/scheduler-docker-local/internal-functions @@ -13,13 +13,15 @@ cmd-scheduler-docker-local-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/plugins/traefik-vhosts/command-functions b/plugins/traefik-vhosts/command-functions index aab85bf01..6e43edce1 100755 --- a/plugins/traefik-vhosts/command-functions +++ b/plugins/traefik-vhosts/command-functions @@ -37,13 +37,15 @@ cmd-traefik-report() { set -- "${REPORT_ARGS[@]}" declare APP="${1:-}" INFO_FLAG="${2:-}" - if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then - APP="--global" - elif [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then + if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then INFO_FLAG="$APP" APP="" fi + if [[ "$REPORT_IS_GLOBAL" == "true" ]]; then + APP="--global" + fi + if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then INFO_FLAG="true" fi diff --git a/tests/unit/builder-dockerfile.bats b/tests/unit/builder-dockerfile.bats index cf4d88ac0..794c31ca9 100644 --- a/tests/unit/builder-dockerfile.bats +++ b/tests/unit/builder-dockerfile.bats @@ -35,6 +35,12 @@ teardown() { echo "status: $status" assert_success assert_output_contains "global builder-dockerfile information" + + run /bin/bash -c "dokku builder-dockerfile:report --global --builder-dockerfile-global-dockerfile-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "Dockerfile" } @test "(builder-dockerfile:set)" { diff --git a/tests/unit/builder-herokuish.bats b/tests/unit/builder-herokuish.bats index a7a66bc11..9fb024bdc 100644 --- a/tests/unit/builder-herokuish.bats +++ b/tests/unit/builder-herokuish.bats @@ -10,6 +10,24 @@ teardown() { destroy_app } +@test "(builder-herokuish:report) --global --builder-herokuish-global-allowed" { + run /bin/bash -c "dokku builder-herokuish:set --global allowed false" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-herokuish:report --global --builder-herokuish-global-allowed" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "false" + + run /bin/bash -c "dokku builder-herokuish:set --global allowed" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(builder-herouish:build .env)" { run deploy_app python dokku@$DOKKU_DOMAIN:$TEST_APP echo "output: $output" diff --git a/tests/unit/builder-lambda.bats b/tests/unit/builder-lambda.bats index 57d01668b..160e28b69 100644 --- a/tests/unit/builder-lambda.bats +++ b/tests/unit/builder-lambda.bats @@ -10,6 +10,24 @@ teardown() { destroy_app } +@test "(builder-lambda:report) --global --builder-lambda-global-lambdayml-path" { + run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path lambda.alt.yml" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-lambda:report --global --builder-lambda-global-lambdayml-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "lambda.alt.yml" + + run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(builder-lambda:set)" { run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk" echo "output: $output" diff --git a/tests/unit/builder-nixpacks.bats b/tests/unit/builder-nixpacks.bats index e7d97af25..ecdd7d59a 100644 --- a/tests/unit/builder-nixpacks.bats +++ b/tests/unit/builder-nixpacks.bats @@ -14,6 +14,24 @@ teardown() { destroy_app } +@test "(builder-nixpacks:report) --global --builder-nixpacks-global-nixpackstoml-path" { + run /bin/bash -c "dokku builder-nixpacks:set --global nixpackstoml-path nixpacks.alt.toml" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-nixpacks:report --global --builder-nixpacks-global-nixpackstoml-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "nixpacks.alt.toml" + + run /bin/bash -c "dokku builder-nixpacks:set --global nixpackstoml-path" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(builder-nixpacks:set)" { run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk" echo "output: $output" diff --git a/tests/unit/builder-pack.bats b/tests/unit/builder-pack.bats index d3d030f64..8e21816af 100644 --- a/tests/unit/builder-pack.bats +++ b/tests/unit/builder-pack.bats @@ -16,6 +16,24 @@ teardown() { global_teardown } +@test "(builder-pack:report) --global --builder-pack-global-projecttoml-path" { + run /bin/bash -c "dokku builder-pack:set --global projecttoml-path project.alt.toml" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-pack:report --global --builder-pack-global-projecttoml-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "project.alt.toml" + + run /bin/bash -c "dokku builder-pack:set --global projecttoml-path" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(builder-pack:set)" { run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk" echo "output: $output" diff --git a/tests/unit/builder-railpack.bats b/tests/unit/builder-railpack.bats index 27cf02663..133e81542 100644 --- a/tests/unit/builder-railpack.bats +++ b/tests/unit/builder-railpack.bats @@ -25,6 +25,24 @@ teardown() { global_teardown } +@test "(builder-railpack:report) --global --builder-railpack-global-railpackjson-path" { + run /bin/bash -c "dokku builder-railpack:set --global railpackjson-path railpack.alt.json" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-railpack:report --global --builder-railpack-global-railpackjson-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "railpack.alt.json" + + run /bin/bash -c "dokku builder-railpack:set --global railpackjson-path" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(builder-railpack:set)" { run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk" echo "output: $output" diff --git a/tests/unit/caddy.bats b/tests/unit/caddy.bats index eef11eed4..00b2c3439 100644 --- a/tests/unit/caddy.bats +++ b/tests/unit/caddy.bats @@ -18,6 +18,24 @@ teardown() { dokku nginx:start } +@test "(caddy:report) --global --caddy-log-level" { + run /bin/bash -c "dokku caddy:set --global log-level DEBUG" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku caddy:report --global --caddy-log-level" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "DEBUG" + + run /bin/bash -c "dokku caddy:set --global log-level" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(caddy) caddy:help" { run /bin/bash -c "dokku caddy" echo "output: $output" diff --git a/tests/unit/certs.bats b/tests/unit/certs.bats index 6a5b16d1d..9de647875 100644 --- a/tests/unit/certs.bats +++ b/tests/unit/certs.bats @@ -53,6 +53,12 @@ teardown() { echo "status: $status" assert_success assert_output_contains "global ssl information" + + run /bin/bash -c "dokku certs:report --global --ssl-bogus" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" } @test "(certs) certs:add" { diff --git a/tests/unit/checks.bats b/tests/unit/checks.bats index b73094c7a..2ecebb16d 100644 --- a/tests/unit/checks.bats +++ b/tests/unit/checks.bats @@ -45,6 +45,12 @@ teardown() { assert_success assert_output_contains "global checks information" + run /bin/bash -c "dokku checks:report --global --checks-global-wait-to-retire" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "90" + run /bin/bash -c "dokku checks:set --global wait-to-retire" echo "output: $output" echo "status: $status" diff --git a/tests/unit/domains.bats b/tests/unit/domains.bats index bbbe71aac..f46882c2d 100644 --- a/tests/unit/domains.bats +++ b/tests/unit/domains.bats @@ -45,6 +45,12 @@ teardown() { echo "status: $status" assert_success assert_output_contains "Global domains information" + + run /bin/bash -c "dokku domains:report --global --domains-global-enabled" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "true" } @test "(domains) domains" { diff --git a/tests/unit/git_3.bats b/tests/unit/git_3.bats index 064d8e9a1..88b479585 100644 --- a/tests/unit/git_3.bats +++ b/tests/unit/git_3.bats @@ -858,4 +858,10 @@ teardown() { echo "status: $status" assert_success assert_output "false" + + run /bin/bash -c "dokku git:report --global --git-global-deploy-branch" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "master" } diff --git a/tests/unit/nginx-vhosts_1.bats b/tests/unit/nginx-vhosts_1.bats index 6d11422dd..d7ff9da48 100644 --- a/tests/unit/nginx-vhosts_1.bats +++ b/tests/unit/nginx-vhosts_1.bats @@ -79,6 +79,22 @@ teardown() { echo "status: $status" assert_success assert_output_contains "global nginx information" + + run /bin/bash -c "dokku nginx:set --global client-max-body-size 5m" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku nginx:report --global --nginx-global-client-max-body-size" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "5m" + + run /bin/bash -c "dokku nginx:set --global client-max-body-size" + echo "output: $output" + echo "status: $status" + assert_success } @test "(nginx-vhosts) proxy:build-config (domains:disable/enable)" { diff --git a/tests/unit/openresty.bats b/tests/unit/openresty.bats index 10b19af8c..5e36a5bb2 100644 --- a/tests/unit/openresty.bats +++ b/tests/unit/openresty.bats @@ -18,6 +18,24 @@ teardown() { dokku nginx:start } +@test "(openresty:report) --global --openresty-global-hsts" { + run /bin/bash -c "dokku openresty:set --global hsts false" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku openresty:report --global --openresty-global-hsts" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "false" + + run /bin/bash -c "dokku openresty:set --global hsts" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(openresty) openresty:help" { run /bin/bash -c "dokku openresty" echo "output: $output" diff --git a/tests/unit/scheduler-docker-local.bats b/tests/unit/scheduler-docker-local.bats index 88bafef00..b0801cb87 100644 --- a/tests/unit/scheduler-docker-local.bats +++ b/tests/unit/scheduler-docker-local.bats @@ -10,6 +10,14 @@ teardown() { global_teardown } +@test "(scheduler-docker-local:report) --global --scheduler-docker-local-init-process" { + run /bin/bash -c "dokku scheduler-docker-local:report --global --scheduler-docker-local-init-process" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "true" +} + @test "(scheduler-docker-local) scheduler-docker-local:help" { run /bin/bash -c "dokku scheduler-docker-local" echo "output: $output" diff --git a/tests/unit/traefik.bats b/tests/unit/traefik.bats index d9bfc29ec..f07f2a6f6 100644 --- a/tests/unit/traefik.bats +++ b/tests/unit/traefik.bats @@ -23,6 +23,24 @@ teardown() { dokku nginx:start } +@test "(traefik:report) --global --traefik-log-level" { + run /bin/bash -c "dokku traefik:set --global log-level DEBUG" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku traefik:report --global --traefik-log-level" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "DEBUG" + + run /bin/bash -c "dokku traefik:set --global log-level" + echo "output: $output" + echo "status: $status" + assert_success +} + @test "(traefik) traefik:help" { run /bin/bash -c "dokku traefik" echo "output: $output"