]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager/tests: validate JSON output from "kresctl cache clear --json" command docs-develop-mana-zr2tn9/deployments/3267
authorAleš Mrázek <ales.mrazek@nic.cz>
Thu, 15 Feb 2024 11:10:08 +0000 (12:10 +0100)
committerOto Šťáva <oto.stava@nic.cz>
Thu, 15 Feb 2024 11:52:38 +0000 (12:52 +0100)
manager/tests/packaging/interactive/cache-clear.sh

index f50cadab4081f9c6984d197042bc68ab2aefc2d3..377cf5d329685c329459432d557ac308269c1fc8 100755 (executable)
@@ -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