Skip to content

Commit

Permalink
test(integration): DR volume when volume backup policy set to always
Browse files Browse the repository at this point in the history
longhorn/longhorn-9330

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang authored and yangchiu committed Aug 29, 2024
1 parent ba5a86a commit b49ab88
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion manager/integration/tests/test_system_backup_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
from common import check_pvc_existence
from common import check_pv_existence
from common import check_backing_image_disk_map_status
from common import wait_for_backup_restore_completed

from common import SETTING_BACKUPSTORE_POLL_INTERVAL
from common import SIZE

from backupstore import set_random_backupstore # NOQA

Expand Down Expand Up @@ -261,6 +263,8 @@ def test_system_backup_with_volume_backup_policy_always(client, volume_name, set
Given a volume is created.
And volume has backup count (1).
And create a DR volume from backup
And wait for DR volume to restore from backup
When system backup (system-backup) has volume backup policy (always).
And system backup (system-backup) created.
Expand All @@ -279,7 +283,14 @@ def test_system_backup_with_volume_backup_policy_always(client, volume_name, set
volume.attach(hostId=host_id)
volume = wait_for_volume_healthy(client, volume_name)

create_backup(client, volume_name)
_, backup, _, _ = create_backup(client, volume_name)

# System backup should skip creating DR volume backup.
dr_volume_name = volume_name + "-dr"
client.create_volume(name=dr_volume_name, size=SIZE,
numberOfReplicas=1, fromBackup=backup.url,
frontend="", standby=True)
wait_for_backup_restore_completed(client, dr_volume_name, backup.name)

system_backup_name = system_backup_random_name()
client.create_system_backup(Name=system_backup_name,
Expand Down

0 comments on commit b49ab88

Please sign in to comment.