]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph-disk/tests/test_main.py
update sources to v12.1.2
[ceph.git] / ceph / src / ceph-disk / tests / test_main.py
index 8c3e08451fd9f9d774f1cb63de988ea213848581..ef6d7d4456e67af0911ab64d7a73bc26fb12d606 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env python
 #
 # Copyright (C) 2015, 2016 Red Hat <contact@redhat.com>
 #
@@ -1264,9 +1264,6 @@ class TestCephDiskDeactivateAndDestroy(unittest.TestCase):
                 list_devices=list_devices_return,
                 get_partition_base=lambda dev_path: '/dev/sdY',
                 _check_osd_status=lambda cluster, osd_id: 0,
-                _remove_from_crush_map=lambda cluster, osd_id: True,
-                _delete_osd_auth_key=lambda cluster, osd_id: True,
-                _deallocate_osd_id=lambda cluster, osd_id: True,
                 zap=lambda dev: True
         ):
             main.main_destroy(args)
@@ -1287,36 +1284,6 @@ class TestCephDiskDeactivateAndDestroy(unittest.TestCase):
             self.assertRaises(Exception, main.main_destroy, args)
         shutil.rmtree(data)
 
-    def test_remove_from_crush_map_fail(self):
-        cluster = 'ceph'
-        osd_id = '5566'
-        with patch.multiple(
-                main,
-                command=raise_command_error
-        ):
-            self.assertRaises(Exception, main._remove_from_crush_map,
-                              cluster, osd_id)
-
-    def test_delete_osd_auth_key_fail(self):
-        cluster = 'ceph'
-        osd_id = '5566'
-        with patch.multiple(
-                main,
-                command=raise_command_error
-        ):
-            self.assertRaises(Exception, main._delete_osd_auth_key,
-                              cluster, osd_id)
-
-    def test_deallocate_osd_id_fail(self):
-        cluster = 'ceph'
-        osd_id = '5566'
-        with patch.multiple(
-                main,
-                command=raise_command_error
-        ):
-            self.assertRaises(Exception, main._deallocate_osd_id,
-                              cluster, osd_id)
-
     def test_main_fix(self):
         if platform.system() == "FreeBSD":
             return