Esempio n. 1
0
 def test__unset_cow(self):
     '''
     Test disabling the subvolume as copy on write.
     '''
     salt_mock = {
         'file.chattr': MagicMock(return_value=True),
     }
     with patch.dict(btrfs.__salt__, salt_mock):
         assert btrfs._unset_cow('/tmp/xxx/@/var')
         salt_mock['file.chattr'].assert_called_with('/tmp/xxx/@/var',
                                                     operator='add',
                                                     attributes='C')
Esempio n. 2
0
 def test__unset_cow(self):
     """
     Test disabling the subvolume as copy on write.
     """
     salt_mock = {
         "file.chattr": MagicMock(return_value=True),
     }
     with patch.dict(btrfs.__salt__, salt_mock):
         assert btrfs._unset_cow("/tmp/xxx/@/var")
         salt_mock["file.chattr"].assert_called_with("/tmp/xxx/@/var",
                                                     operator="add",
                                                     attributes="C")