]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests/packaging/interactive: suppress some commands stdout
authorAleš Mrázek <ales.mrazek@nic.cz>
Tue, 26 Nov 2024 20:43:48 +0000 (21:43 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 3 Dec 2024 07:53:33 +0000 (08:53 +0100)
tests/packaging/interactive/cache-clear.sh
tests/packaging/interactive/etag.sh
tests/packaging/interactive/metrics.sh
tests/packaging/interactive/schema.sh

index 79d88a123f4d31a4b375a626cad1581b85fea478..512096d633415b355ae40974c302078b5d98fde4 100755 (executable)
@@ -1,14 +1,14 @@
 #!/usr/bin/env bash
 
 # clear full cache
-kresctl cache clear
+kresctl cache clear > /dev/null
 if [ "$?" -ne "0" ]; then
        echo "Could not clear full cache"
        exit 1
 fi
 
 # clear just example.com. AAAA record, get JSON output
-kresctl cache clear --json --exact-name --rr-type AAAA example.com. | python3 -m json.tool
+kresctl cache clear --json --exact-name --rr-type AAAA example.com. | python3 -m json.tool > /dev/null
 if [ "$?" -ne "0" ]; then
        echo "Could not clear example.com. AAAA record or output is not a valid JSON"
        exit 1
index 7038e00699add199d599fbc1b28e9bd2c1879816..d40f358f343ceec2db361bc2d4505c70a917be01 100755 (executable)
@@ -4,11 +4,7 @@ set -e
 
 socket_opt="--unix-socket /run/knot-resolver/kres-api.sock"
 
-echo "  etag"
 etag="$(curl --silent $socket_opt --fail http://localhost:5000/v1/config -o /dev/null -v 2>&1 | grep ETag | sed 's/< ETag: //;s/\s//')"
-echo "  etag OK"
 
-echo "  status"
 status=$(curl --silent $socket_opt --fail  http://localhost:5000/v1/config --header "If-None-Match: $etag" -w "%{http_code}" -o /dev/null)
 test "$status" -eq 304
-echo "  status OK"
index 99b21124d6f873978663a209b02869b70ce1c483..fbf2ff3998b1c80136aac8bd537a1e2b57552dd6 100755 (executable)
@@ -4,13 +4,13 @@ set -e
 
 curl --silent --fail --unix-socket /run/knot-resolver/kres-api.sock http://localhost/metrics > /dev/null
 
-kresctl metrics
+kresctl metrics > /dev/null
 if [ "$?" -ne "0" ]; then
        echo "Could not get metrics in JSON format"
        exit 1
 fi
 
-kresctl metrics --prometheus
+kresctl metrics --prometheus > /dev/null
 if [ "$?" -ne "0" ]; then
        echo "Could not get metrics in Prometheus format"
        exit 1
index 3ea45d522b3da664eec99acf80c45ec65d1dccb5..9f67165389ca8f2d394c0a253327cd330cb3fc91 100755 (executable)
@@ -1,14 +1,14 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 set -e
 
-kresctl schema
+kresctl schema > /dev/null
 if [ "$?" -ne "0" ]; then
        echo "Failed to generate JSON schema with 'kresctl'"
        exit 1
 fi
 
-kresctl schema --live
+kresctl schema --live > /dev/null
 if [ "$?" -ne "0" ]; then
        echo "Failed to get JSON schema from the running resolver"
        exit 1