]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
tests/rgw: use json format output for user info v5.0.9
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 26 Aug 2021 20:45:07 +0000 (16:45 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Fri, 27 Aug 2021 18:40:32 +0000 (14:40 -0400)
commitd054864366a4f4e351dfdccd914e4065faa4b7d4
tree88085f6a68316fb54b9de5180281e6b7fcfa1bb8
parentdc4b8445faaf5824ef5fe16b5baebe9c92971349
tests/rgw: use json format output for user info

If the radosgw user already exists then we need to have the output in json
format because we are expecting to load the output with json.loads()
Otherwise we have pytest failure like:

```console
self = <json.decoder.JSONDecoder object at 0x7fa2f00a5fd0>, s = '', idx = 0

    def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` beginning with
        a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.

        """
        try:
            obj, end = self.scan_once(s, idx)
        except StopIteration as err:
>           raise JSONDecodeError("Expecting value", s, err.value) from None
E           json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit f2bd8ae70f0ae5d0c7c7a36bd6ecdad6383feed9)
tests/functional/tests/rgw/test_rgw_tuning.py