From babff628aa9a48ced57100e3879232d94bf19d70 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 1 Mar 2023 10:49:54 -0600 Subject: 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. --- smoketest/scripts/cli/test_service_https.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3