]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager/tests: simple test for /cache-clear API endpoint
authorAleš Mrázek <ales.mrazek@nic.cz>
Mon, 29 Jan 2024 14:19:58 +0000 (15:19 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Wed, 14 Feb 2024 12:14:30 +0000 (13:14 +0100)
manager/tests/packaging/interactive/cahe-clear.sh [new file with mode: 0755]

diff --git a/manager/tests/packaging/interactive/cahe-clear.sh b/manager/tests/packaging/interactive/cahe-clear.sh
new file mode 100755 (executable)
index 0000000..4c08612
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# clear full cache
+kresctl cache-clear
+if [ "$?" -ne "0" ]; then
+       echo "Could not clear full cache"
+       exit 1
+fi
+
+# clear just example.com. AAAA record
+kresctl cache-clear --exact-name --rr-type AAAA example.com.
+if [ "$?" -ne "0" ]; then
+       echo "Could not clear example.com. AAAA record"
+       exit 1
+fi