def failrestore_test(self): # """ create a namespace # copy a volume to it # rename the volume # take a lock on the namespace # try to rename the volume again -> should fail # """ PITReplication.testConfiguration() ns = "failrestore-test" testbackend.createNamespace(ns) target = testbackend.theBackend()(ns) PITReplication.copy(self.source, target) PITReplication.renameVolume(target, "new_name1") pid = lockedexecutable.start(target) self.assertRaises(Exception, PITReplication.renameVolume, target, "new_name2", 'rename the volume again should fail') lockedexecutable.stop(pid)
def test_rename(self): testbackend.createNamespace("xxx") target = testbackend.theBackend()("xxx") B.copy(self.source, target) B.renameVolume(target, "new_name")