Skip to content

Commit

Permalink
fix: acceptance test failure (#2148)
Browse files Browse the repository at this point in the history
1. disable disk auto-detach to debug test after failure
2. use wait_for_block_device_to_appear implementation from helpers
  • Loading branch information
antonmyagkov committed Sep 27, 2024
1 parent 4e0d085 commit 98ac178
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cloud/disk_manager/test/acceptance/test_runner/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ def wait_for_block_device_to_appear(
disk_id: str,
module_factory,
ssh_key_path: str | None = None,
) -> str:
device_to_id_mapper = VirtualDevicesToIdMapper(ip, module_factory, ssh_key_path)
return device_to_id_mapper.wait_for_disk_to_appear(disk_id)
):
device_name = f'/dev/disk/by-id/virtio-{disk_id}'
helpers = module_factory.make_helpers(False)
helpers.wait_for_block_device_to_appear(ip, device_name, ssh_key_path=ssh_key_path)


class VirtualDevicesToIdMapper:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def obtain(self) -> Ycp.Instance:

@contextmanager
def attach_disk(self, disk: Ycp.Disk):
with self._ycp.attach_disk(self._instance, disk):
# Temprorary disable autodetach to debug acceptance test failure
with self._ycp.attach_disk(self._instance, disk, None, False):
yield wait_for_block_device_to_appear(
self._instance.ip,
disk.id,
Expand Down

0 comments on commit 98ac178

Please sign in to comment.