diff tests/test-phabricator.t @ 41017:d7d3164e6a31 stable

phabricator: properly encode boolean types in the request body I tripped over this playing with `hg debugcallconduit` to query for valid reviewers. If the JSON on stdin is written as 'True' or 'False', python complains it isn't valid JSON. If it's written as 'true' or 'false', it made it to the server, but got kicked back with this: abort: Conduit Error (ERR-CONDUIT-CORE): Error while reading "isBot": Expected boolean (true or false), got something else. The test isn't really relevant here (the code can be reverted, and it will pass), but this gives us coverage for the debug command.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 21 Dec 2018 17:36:12 -0500
parents 4057e38bba76
children 0101a35deae2
line wrap: on
line diff
--- a/tests/test-phabricator.t	Tue Dec 11 22:34:07 2018 +0900
+++ b/tests/test-phabricator.t	Fri Dec 21 17:36:12 2018 -0500
@@ -65,6 +65,27 @@
   D4597 - created - 1a5640df7bbf: create beta for phabricator test
   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/1a5640df7bbf-6daf3e6e-phabsend.hg
 
+  $ hg debugcallconduit user.search --test-vcr "$VCR/phab-conduit.json" <<EOF
+  > {
+  >     "constraints": {
+  >         "isBot": true
+  >     }
+  > }
+  > EOF
+  {
+    "cursor": {
+      "after": null,
+      "before": null,
+      "limit": 100,
+      "order": null
+    },
+    "data": [],
+    "maps": {},
+    "query": {
+      "queryKey": null
+    }
+  }
+
 Template keywords
   $ hg log -T'{rev} {phabreview|json}\n'
   1 {"id": "D4597", "url": "https://phab.mercurial-scm.org/D4597"}