]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: update test_mgr_is_up()
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 14 Aug 2019 07:08:24 +0000 (09:08 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 14 Aug 2019 14:42:02 +0000 (16:42 +0200)
the data structure has changed in octopus:

```
    "mgrmap": {
        "available": true,
        "modules": [
            "dashboard",
            "prometheus"
        ],
        "num_standbys": 0,
        "services": {
            "prometheus": "http://mgr0:9283/"
        }
    },
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/functional/tests/mgr/test_mgr.py

index 167640e1a537b9120fd30ae709ab14c6299d8dc6..d52c6fdc0d9f6ce6872c68cad572998ab97c0fe3 100644 (file)
@@ -36,9 +36,5 @@ class TestMGRs(object):
         )
         output_raw = host.check_output(cmd)
         output_json = json.loads(output_raw)
-        daemons = output_json['mgrmap']['active_name']
-        standbys = [i['name'] for i in output_json['mgrmap']['standbys']]
-        result = hostname in daemons
-        if not result:
-            result = hostname in standbys
-        assert result
+
+        assert output_json['mgrmap']['available']