From ee9399a1395ec05d0392ddda1bce5595e07b3f2a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 11 Mar 2021 13:47:37 -0500 Subject: [PATCH] mgr/cephadm/schedule: add test case Matches wonky cephadm.py placement (+1 on the count). Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/tests/test_scheduling.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pybind/mgr/cephadm/tests/test_scheduling.py b/src/pybind/mgr/cephadm/tests/test_scheduling.py index 5e10bc729fa..408415e92be 100644 --- a/src/pybind/mgr/cephadm/tests/test_scheduling.py +++ b/src/pybind/mgr/cephadm/tests/test_scheduling.py @@ -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): -- 2.47.3