From 0da6527ef684e8812717b2bbeb0902ad65e337dd Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 24 May 2026 02:20:52 -0400 Subject: [PATCH] test: rename logs:report vector key test and guard old keys The asymmetric --logs-vector-global-image and --logs-vector-global-networks flags were renamed to --logs-global-vector-image and --logs-global-vector-networks in #8640 so they match the standard `---global-` shape used by every other report. The bats description string at tests/unit/logs.bats:533 was still pinned to the old asymmetric phrasing, and there was no assertion that the deprecated JSON keys had actually been removed. Updates the test description to match its assertions and adds a regression guard that fails if logs-vector-global-image or logs-vector-global-networks ever reappear in the --global JSON report. Closes #8632. --- tests/unit/logs.bats | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/unit/logs.bats b/tests/unit/logs.bats index de05193cb..7df4f8c89 100644 --- a/tests/unit/logs.bats +++ b/tests/unit/logs.bats @@ -530,7 +530,7 @@ teardown() { assert_success } -@test "(logs:report) vector-global-image and vector-global-networks raw" { +@test "(logs:report) global-vector-image and global-vector-networks raw" { run create_app assert_success @@ -560,6 +560,15 @@ teardown() { assert_output "" } +@test "(logs:report) does not expose deprecated logs-vector-global-* keys" { + run /bin/bash -c "dokku logs:report --global --format json" + echo "output: $output" + echo "status: $status" + assert_success + assert_output_not_contains "logs-vector-global-image" + assert_output_not_contains "logs-vector-global-networks" +} + @test "(logs) logs:set --global vector-networks" { docker network create test-vector-net-a >/dev/null docker network create test-vector-net-b >/dev/null