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 `--<plugin>-global-<property>` 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.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-24 02:20:52 -04:00
parent 5df399273a
commit 0da6527ef6

View File

@@ -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