From: Sebastian Wagner Date: Tue, 10 Mar 2020 12:38:36 +0000 (+0100) Subject: mgr/dashboard: Adapt tests to new DriveGroupSpec X-Git-Tag: v15.1.1~33^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d82603babe385e59182c69c2ba2e1902d893a966;p=ceph-ci.git mgr/dashboard: Adapt tests to new DriveGroupSpec Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/dashboard/tests/test_osd.py b/src/pybind/mgr/dashboard/tests/test_osd.py index 0cc4ca8d892..beee677b2c0 100644 --- a/src/pybind/mgr/dashboard/tests/test_osd.py +++ b/src/pybind/mgr/dashboard/tests/test_osd.py @@ -9,6 +9,7 @@ try: except ImportError: from unittest import mock from ceph.deployment.drive_group import DeviceSelection, DriveGroupSpec +from ceph.deployment.service_spec import PlacementSpec from . import ControllerTestCase from ..controllers.osd import Osd @@ -301,11 +302,11 @@ class OsdTest(ControllerTestCase): self._task_post('/api/osd', data) self.assertStatus(201) fake_client.osds.create.assert_called_with( - [DriveGroupSpec(host_pattern='*', - name='all_hdd', + [DriveGroupSpec(placement=PlacementSpec(host_pattern='*'), + service_id='all_hdd', data_devices=DeviceSelection(rotational=True)), - DriveGroupSpec(host_pattern='b', - name='b_ssd', + DriveGroupSpec(placement=PlacementSpec(host_pattern='b'), + service_id='b_ssd', data_devices=DeviceSelection(rotational=False))]) # Invalid DriveGroups