summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/tests/test_smb.py
diff options
context:
space:
mode:
authorDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>2024-12-04 06:51:11 +0100
committerDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>2025-01-27 09:59:40 +0100
commit9e512e074c2d79010f212978f49d3ebdba7588d1 (patch)
tree80be974b8923402f010fd6780abd412f76b7bf5a /src/pybind/mgr/dashboard/tests/test_smb.py
parentMerge pull request #60917 from zdover23/wip-doc-2024-12-03-rados-ops-health-c... (diff)
downloadceph-9e512e074c2d79010f212978f49d3ebdba7588d1.tar.xz
ceph-9e512e074c2d79010f212978f49d3ebdba7588d1.zip
mgr/dashboard: delete smb cluster
Fixes: https://tracker.ceph.com/issues/69191 https://tracker.ceph.com/issues/69605 Signed-off-by: Dnyaneshwari Talwekar <dtalweka@redhat.com>
Diffstat (limited to 'src/pybind/mgr/dashboard/tests/test_smb.py')
-rw-r--r--src/pybind/mgr/dashboard/tests/test_smb.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/tests/test_smb.py b/src/pybind/mgr/dashboard/tests/test_smb.py
index 754df482add..9a577709d06 100644
--- a/src/pybind/mgr/dashboard/tests/test_smb.py
+++ b/src/pybind/mgr/dashboard/tests/test_smb.py
@@ -121,6 +121,27 @@ class SMBClusterTest(ControllerTestCase):
self.assertStatus(201)
self.assertInJsonBody(json.dumps(self._clusters['resources'][1]))
+ def test_remove(self):
+ _res = {
+ "resource": {
+ "resource_type": "ceph.smb.cluster",
+ "cluster_id": "smbRemoveCluster",
+ "intent": "removed"
+ },
+ "state": "removed",
+ "success": "true"
+ }
+ _res_simplified = {
+ "resource_type": "ceph.smb.cluster",
+ "cluster_id": "smbRemoveCluster",
+ "intent": "removed"
+ }
+ mgr.remote = Mock(return_value=Mock(return_value=_res))
+ mgr.remote.return_value.one.return_value.to_simplified = Mock(return_value=_res_simplified)
+ self._delete(f'{self._endpoint}/smbRemoveCluster')
+ self.assertStatus(204)
+ mgr.remote.assert_called_once_with('smb', 'apply_resources', json.dumps(_res_simplified))
+
class SMBShareTest(ControllerTestCase):
_endpoint = '/api/smb/share'