diff options
author | John Estabrook <jestabro@vyos.io> | 2023-03-01 10:49:54 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-03-01 11:10:37 -0600 |
commit | babff628aa9a48ced57100e3879232d94bf19d70 (patch) | |
tree | 54cdea1a692c6ba60d789c4d6013273cdb819342 | |
parent | 57ca4de2160254cc5a14d35efaba8123c4e9d542 (diff) | |
download | vyos-1x-babff628aa9a48ced57100e3879232d94bf19d70.tar.gz vyos-1x-babff628aa9a48ced57100e3879232d94bf19d70.zip |
graphql: T5040: adjust smoketest for nullable key
Since 'key' field is no longer required, a missing key will register an
error in the resolver, instead of being rejected as bad request.
-rwxr-xr-x | smoketest/scripts/cli/test_service_https.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_service_https.py b/smoketest/scripts/cli/test_service_https.py index 0f4b1393c..1adf1f5cf 100755 --- a/smoketest/scripts/cli/test_service_https.py +++ b/smoketest/scripts/cli/test_service_https.py @@ -193,7 +193,8 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): """ r = request('POST', graphql_url, verify=False, headers=headers, json={'query': query_no_key}) - self.assertEqual(r.status_code, 400) + success = r.json()['data']['SystemStatus']['success'] + self.assertFalse(success) # GraphQL token authentication test: request token; pass in header # of query. |