Example #1
0
    def test_invalid_delete_extensions(self):
        global_exts = 'volume_manager', 'bareon', 'ultralogger'
        data = 'volume_manager', 'bareon', 'invalid'
        cluster = mock.Mock()
        cluster.extensions = global_exts

        with self.assertRaisesRegexp(errors.CannotFindExtension,
                                     'No such extensions to disable: invalid'):
            ExtensionValidator.validate_delete(set(data), cluster)
Example #2
0
    def test_invalid_delete_extensions(self):
        global_exts = 'volume_manager', 'bareon', 'ultralogger'
        data = 'volume_manager', 'bareon', 'invalid'
        cluster = mock.Mock()
        cluster.extensions = global_exts

        with self.assertRaisesRegexp(errors.CannotFindExtension,
                                     'No such extensions to disable: invalid'):
                ExtensionValidator.validate_delete(set(data), cluster)
Example #3
0
    def test_validate_delete_extensions(self):
        global_exts = 'volume_manager', 'bareon', 'ultralogger'
        cluster = mock.Mock()
        cluster.extensions = global_exts

        ExtensionValidator.validate_delete(set(global_exts[:2]), cluster)
Example #4
0
    def test_validate_delete_extensions(self):
        global_exts = 'volume_manager', 'bareon', 'ultralogger'
        cluster = mock.Mock()
        cluster.extensions = global_exts

        ExtensionValidator.validate_delete(set(global_exts[:2]), cluster)