test: align report key assertions with raw and computed split
The caddy and haproxy bats suites referenced `refute_output`, which is not provided by the in-tree test_helper, so the steps failed with `command not found`. The traefik `api-entry-point property` test and the logs `logs:set global` test still queried the removed bare `--traefik-api-entry-point` flag and the pre-split `--logs-global-max-size` default respectively. The assertions now use `assert_output_exists`, the `--traefik-computed-` flag, and the raw/computed key pair for `logs:set --global max-size`.
This commit is contained in:
@@ -77,7 +77,7 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
refute_output ""
|
assert_output_exists
|
||||||
|
|
||||||
run /bin/bash -c "dokku --quiet caddy:report --global --format json | jq -r '.\"global-polling-interval\"'"
|
run /bin/bash -c "dokku --quiet caddy:report --global --format json | jq -r '.\"global-polling-interval\"'"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
refute_output ""
|
assert_output_exists
|
||||||
|
|
||||||
run /bin/bash -c "dokku --quiet haproxy:report --global --format json | jq -r '.\"global-refresh-conf\"'"
|
run /bin/bash -c "dokku --quiet haproxy:report --global --format json | jq -r '.\"global-refresh-conf\"'"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
|
|||||||
@@ -412,7 +412,7 @@ teardown() {
|
|||||||
assert_success
|
assert_success
|
||||||
assert_output_not_exists
|
assert_output_not_exists
|
||||||
|
|
||||||
run /bin/bash -c "dokku logs:report $TEST_APP --logs-global-max-size 2>&1"
|
run /bin/bash -c "dokku logs:report $TEST_APP --logs-computed-max-size 2>&1"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
@@ -428,6 +428,12 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output_not_exists
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku logs:report $TEST_APP --logs-computed-max-size 2>&1"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
assert_output "10m"
|
assert_output "10m"
|
||||||
|
|
||||||
run /bin/bash -c "dokku logs:set --global max-size 20m" 2>&1
|
run /bin/bash -c "dokku logs:set --global max-size 20m" 2>&1
|
||||||
@@ -442,6 +448,12 @@ teardown() {
|
|||||||
assert_success
|
assert_success
|
||||||
assert_output "20m"
|
assert_output "20m"
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku logs:report $TEST_APP --logs-computed-max-size 2>&1"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
assert_output "20m"
|
||||||
|
|
||||||
run /bin/bash -c "dokku logs:set --global max-size unlimited" 2>&1
|
run /bin/bash -c "dokku logs:set --global max-size unlimited" 2>&1
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
@@ -464,6 +476,12 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output_not_exists
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku logs:report $TEST_APP --logs-computed-max-size 2>&1"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
assert_output "10m"
|
assert_output "10m"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ teardown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "(traefik) api-entry-point property" {
|
@test "(traefik) api-entry-point property" {
|
||||||
run /bin/bash -c "dokku traefik:report $TEST_APP --traefik-api-entry-point"
|
run /bin/bash -c "dokku traefik:report $TEST_APP --traefik-computed-api-entry-point"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
@@ -661,7 +661,7 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run /bin/bash -c "dokku traefik:report $TEST_APP --traefik-api-entry-point"
|
run /bin/bash -c "dokku traefik:report $TEST_APP --traefik-computed-api-entry-point"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
@@ -672,7 +672,7 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run /bin/bash -c "dokku traefik:report $TEST_APP --traefik-api-entry-point"
|
run /bin/bash -c "dokku traefik:report $TEST_APP --traefik-computed-api-entry-point"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|||||||
Reference in New Issue
Block a user