]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: check that currentServer field is set in resolvectl JSON status 40396/head
authorNick Rosbrook <enr0n@ubuntu.com>
Mon, 19 Jan 2026 18:48:07 +0000 (13:48 -0500)
committerNick Rosbrook <enr0n@ubuntu.com>
Mon, 19 Jan 2026 18:48:07 +0000 (13:48 -0500)
test/units/TEST-75-RESOLVED.sh

index 31023ca17a3985d6388dae79ec68a06af4eb0b90..47b5fa666012d5e0e8b8490301fa87164514f88b 100755 (executable)
@@ -959,6 +959,9 @@ testcase_10_resolvectl_json() {
 
     assert_eq "$(resolvectl --json=short nta dns0 | jq -rc '.[0].negativeTrustAnchors | .[0]')" 'bar'
     assert_eq "$(jq -rc '.[0].negativeTrustAnchors | .[0]' "$status_json")" 'bar'
+
+    # Test that currentServer is non-empty.
+    jq -rce '.[0].currentServer' "$status_json"
 }
 
 # Test serve stale feature and NFTSet= if nftables is installed