]> granicus.if.org Git - pdns/commitdiff
turns out that you also need to strip trailing , to be impervious to JSON order changes.
authorbert hubert <bert.hubert@powerdns.com>
Tue, 22 Mar 2016 12:48:32 +0000 (13:48 +0100)
committerbert hubert <bert.hubert@powerdns.com>
Tue, 22 Mar 2016 12:48:32 +0000 (13:48 +0100)
regression-tests.recursor/comments-in-forward-zones-file/command
regression-tests.recursor/comments-in-forward-zones-file/expected_result

index a9798f8dd29e2ea7f87a925d03b6ab5ef19d253d..5896eb8be8bd63bcdc87add35bfac8c79eb8add1 100755 (executable)
@@ -1,2 +1,2 @@
 #!/bin/sh
-curl -s -H 'X-API-Key: secret' 127.0.0.1:8082/api/v1/servers/localhost/zones | jq '.[] | select(.kind=="Forwarded")' | sort
+curl -s -H 'X-API-Key: secret' 127.0.0.1:8082/api/v1/servers/localhost/zones | jq '.[] | select(.kind=="Forwarded")' | sort | sed 's/,$//'
index e489e9b55e0ec80ead733c6f8a219fc13adf6ff2..138cff8b88644f4e1a3597aacb79124405596d74 100644 (file)
@@ -1,5 +1,5 @@
-  ],
-  ],
+  ]
+  ]
 {
 {
 }
@@ -8,13 +8,13 @@
     "8.8.8.8:53"
   "id": "forward-zones-test2.non-existing.powerdns.com."
   "id": "forward-zones-test.non-existing.powerdns.com."
-  "kind": "Forwarded",
-  "kind": "Forwarded",
-  "name": "forward-zones-test2.non-existing.powerdns.com.",
-  "name": "forward-zones-test.non-existing.powerdns.com.",
-  "recursion_desired": false,
-  "recursion_desired": false,
+  "kind": "Forwarded"
+  "kind": "Forwarded"
+  "name": "forward-zones-test2.non-existing.powerdns.com."
+  "name": "forward-zones-test.non-existing.powerdns.com."
+  "recursion_desired": false
+  "recursion_desired": false
   "servers": [
   "servers": [
-  "url": "/api/v1/servers/localhost/zones/forward-zones-test2.non-existing.powerdns.com.",
-  "url": "/api/v1/servers/localhost/zones/forward-zones-test.non-existing.powerdns.com.",
+  "url": "/api/v1/servers/localhost/zones/forward-zones-test2.non-existing.powerdns.com."
+  "url": "/api/v1/servers/localhost/zones/forward-zones-test.non-existing.powerdns.com."