Extending testing scope of Incremental Backup
This patch adds the test to restore from an incremental backup.
Change-Id: I10272d737bbe3b196dfaf6ce242c8ccdf0787f5c
Sofia Enriquez authored 7 years ago
Luigi Toscano committed 6 years ago
| 66 | 66 | self.assertEqual(src_vol['id'], restore['volume_id']) |
| 67 | 67 | self.assertEqual(backup['id'], restore['backup_id']) |
| 68 | 68 | |
| 69 | @decorators.idempotent_id('b5d837b0-7066-455d-88fc-4a721a899306') | |
| 70 | def test_incr_backup_create_and_restore_to_an_existing_volume(self): | |
| 71 | """Test incr backup create and restore to an existing volume.""" | |
| 72 | # Create volume | |
| 73 | src_vol = self.create_volume() | |
| 74 | # Create a full backup | |
| 75 | self.create_backup(volume_id=src_vol['id']) | |
| 76 | # Create an inc backup | |
| 77 | backup = self.create_backup(volume_id=src_vol['id'], | |
| 78 | incremental=True) | |
| 79 | # Restore to existing volume | |
| 80 | restore = self.backups_client.restore_backup( | |
| 81 | backup_id=backup['id'], | |
| 82 | volume_id=src_vol['id'])['restore'] | |
| 83 | waiters.wait_for_volume_resource_status( | |
| 84 | self.backups_client, | |
| 85 | backup['id'], 'available') | |
| 86 | waiters.wait_for_volume_resource_status( | |
| 87 | self.volumes_client, | |
| 88 | src_vol['id'], 'available') | |
| 89 | self.assertEqual(src_vol['id'], restore['volume_id']) | |
| 90 | self.assertEqual(backup['id'], restore['backup_id']) | |
| 91 | ||
| 69 | 92 | @decorators.idempotent_id('c810fe2c-cb40-43ab-96aa-471b74516a98') |
| 70 | 93 | def test_incremental_backup(self): |
| 71 | 94 | """Test create incremental backup.""" |