Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)