From: Aleš Mrázek Date: Thu, 15 Feb 2024 11:10:08 +0000 (+0100) Subject: manager/tests: validate JSON output from "kresctl cache clear --json" command X-Git-Tag: v6.0.7~23^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fenvironments%2Fdocs-develop-mana-zr2tn9%2Fdeployments%2F3267;p=thirdparty%2Fknot-resolver.git manager/tests: validate JSON output from "kresctl cache clear --json" command --- diff --git a/manager/tests/packaging/interactive/cache-clear.sh b/manager/tests/packaging/interactive/cache-clear.sh index f50cadab4..377cf5d32 100755 --- a/manager/tests/packaging/interactive/cache-clear.sh +++ b/manager/tests/packaging/interactive/cache-clear.sh @@ -7,9 +7,9 @@ if [ "$?" -ne "0" ]; then exit 1 fi -# clear just example.com. AAAA record -kresctl cache clear --exact-name --rr-type AAAA example.com. +# clear just example.com. AAAA record, get JSON output +kresctl cache clear --json --exact-name --rr-type AAAA example.com. | python3 -m json.tool if [ "$?" -ne "0" ]; then - echo "Could not clear example.com. AAAA record" + echo "Could not clear example.com. AAAA record or output is not a valid JSON" exit 1 fi