]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm/schedule: add test case
authorSage Weil <sage@newdream.net>
Thu, 11 Mar 2021 18:47:37 +0000 (13:47 -0500)
committerSage Weil <sage@newdream.net>
Mon, 15 Mar 2021 22:55:16 +0000 (18:55 -0400)
Matches wonky cephadm.py placement (+1 on the count).

Signed-off-by: Sage Weil <sage@newdream.net>
src/pybind/mgr/cephadm/tests/test_scheduling.py

index 5e10bc729facff538ee9c77583780464ef325a72..408415e92be02d62362485e6398ce8405567fa32 100644 (file)
@@ -556,6 +556,18 @@ class NodeAssignmentTest(NamedTuple):
              'host2(port=81)', 'host3(port=81)'],
             ['rgw.c']
         ),
+        # cephadm.py teuth case
+        NodeAssignmentTest(
+            'mgr',
+            PlacementSpec(count=3, hosts=['host1=y', 'host2=x']),
+            'host1 host2'.split(),
+            [
+                DaemonDescription('mgr', 'y', 'host1'),
+                DaemonDescription('mgr', 'x', 'host2'),
+            ],
+            ['host1(name=y)', 'host2(name=x)'],
+            [], []
+        ),
     ])
 def test_node_assignment(service_type, placement, hosts, daemons,
                          expected, expected_add, expected_remove):