Skip to content

Commit

Permalink
test: update test_backup_with_backing_image
Browse files Browse the repository at this point in the history
add scenario for backing image size larger than volume size

ref: longhorn/longhorn#9227

Signed-off-by: Chris <[email protected]>
  • Loading branch information
chriscchien authored and yangchiu committed Aug 20, 2024
1 parent 9b97bd8 commit 67e68c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manager/integration/tests/test_backing_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from common import BACKING_IMAGE_NAME, BACKING_IMAGE_QCOW2_URL, \
BACKING_IMAGE_RAW_URL, BACKING_IMAGE_EXT4_SIZE, \
DIRECTORY_PATH, BACKING_IMAGE_SOURCE_TYPE_DOWNLOAD, \
BACKING_IMAGE_SOURCE_TYPE_FROM_VOLUME, Gi
BACKING_IMAGE_SOURCE_TYPE_FROM_VOLUME, Gi, SIZE

from common import wait_for_volume_detached
from common import wait_for_backing_image_status
Expand Down Expand Up @@ -264,11 +264,12 @@ def test_snapshot_prune_and_coalesce_simultaneously_with_backing_image(client, v

@pytest.mark.coretest # NOQA
@pytest.mark.backing_image # NOQA
def test_backup_with_backing_image(set_random_backupstore, client, volume_name): # NOQA
@pytest.mark.parametrize("volume_size", [str(BACKING_IMAGE_EXT4_SIZE), SIZE]) # NOQA
def test_backup_with_backing_image(set_random_backupstore, client, volume_name, volume_size): # NOQA
for bi_url in (BACKING_IMAGE_QCOW2_URL, BACKING_IMAGE_RAW_URL):
create_backing_image_with_matching_url(
client, BACKING_IMAGE_NAME, bi_url)
backup_test(client, volume_name, str(BACKING_IMAGE_EXT4_SIZE),
backup_test(client, volume_name, volume_size,
BACKING_IMAGE_NAME)
cleanup_all_volumes(client)
cleanup_all_backing_images(client)
Expand Down

0 comments on commit 67e68c8

Please sign in to comment.