From: Brad Hubbard Date: Tue, 31 Mar 2020 02:49:26 +0000 (+1000) Subject: qa/suites/rados/rest: Don't pass empty dict as data arg X-Git-Tag: v15.2.2~66^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=46083b6fd5e63e5927e0ff72f56dfb3fad07ecae;p=ceph.git qa/suites/rados/rest: Don't pass empty dict as data arg Passing an empty 'args' dict as a data argument when calling requests.get somehow confuses the transaction, causing it to fail. Pass 'None' instead. Fixes: https://tracker.ceph.com/issues/43720 Signed-off-by: Brad Hubbard (cherry picked from commit e20e6fc3295da836fb5f098d46d6190ab28195d5) --- diff --git a/qa/workunits/rest/test_mgr_rest_api.py b/qa/workunits/rest/test_mgr_rest_api.py index 1ed6c757efcd..f8158af25314 100755 --- a/qa/workunits/rest/test_mgr_rest_api.py +++ b/qa/workunits/rest/test_mgr_rest_api.py @@ -85,7 +85,7 @@ for method, endpoint, args in screenplay: print("URL = " + url) request = getattr(requests, method)( url, - data=json.dumps(args), + data=json.dumps(args) if args else None, headers=headers, verify=False, auth=auth)