コード例 #1
0
ファイル: test_backup_swift.py プロジェクト: ArikaChen/cinder
 def test_backup_zlib(self):
     self._create_backup_db_entry()
     self.flags(backup_compression_algorithm='zlib')
     service = SwiftBackupService(self.ctxt)
     self.volume_file.seek(0)
     backup = db.backup_get(self.ctxt, 123)
     service.backup(backup, self.volume_file)
コード例 #2
0
 def test_backup_zlib(self):
     self._create_backup_db_entry()
     self.flags(backup_compression_algorithm='zlib')
     service = SwiftBackupService(self.ctxt)
     self.volume_file.seek(0)
     backup = db.backup_get(self.ctxt, 123)
     service.backup(backup, self.volume_file)
コード例 #3
0
ファイル: test_backup_swift.py プロジェクト: ArikaChen/cinder
 def test_backup_default_container(self):
     self._create_backup_db_entry(container=None)
     service = SwiftBackupService(self.ctxt)
     self.volume_file.seek(0)
     backup = db.backup_get(self.ctxt, 123)
     service.backup(backup, self.volume_file)
     backup = db.backup_get(self.ctxt, 123)
     self.assertEquals(backup['container'], 'volumebackups')
コード例 #4
0
 def test_backup_default_container(self):
     self._create_backup_db_entry(container=None)
     service = SwiftBackupService(self.ctxt)
     self.volume_file.seek(0)
     backup = db.backup_get(self.ctxt, 123)
     service.backup(backup, self.volume_file)
     backup = db.backup_get(self.ctxt, 123)
     self.assertEquals(backup['container'], 'volumebackups')
コード例 #5
0
ファイル: test_backup_swift.py プロジェクト: ArikaChen/cinder
 def test_backup_custom_container(self):
     container_name = 'fake99'
     self._create_backup_db_entry(container=container_name)
     service = SwiftBackupService(self.ctxt)
     self.volume_file.seek(0)
     backup = db.backup_get(self.ctxt, 123)
     service.backup(backup, self.volume_file)
     backup = db.backup_get(self.ctxt, 123)
     self.assertEquals(backup['container'], container_name)
コード例 #6
0
 def test_backup_custom_container(self):
     container_name = 'fake99'
     self._create_backup_db_entry(container=container_name)
     service = SwiftBackupService(self.ctxt)
     self.volume_file.seek(0)
     backup = db.backup_get(self.ctxt, 123)
     service.backup(backup, self.volume_file)
     backup = db.backup_get(self.ctxt, 123)
     self.assertEquals(backup['container'], container_name)