|
13 | 13 | import lib.config as global_config |
14 | 14 | from lib import pxe |
15 | 15 | from lib.common import ( |
16 | | - callable_marker, |
17 | 16 | DiskDevName, |
18 | 17 | HostAddress, |
| 18 | + callable_marker, |
19 | 19 | is_uuid, |
20 | 20 | prefix_object_name, |
21 | | - setup_formatted_and_mounted_disk, |
22 | 21 | shortened_nodeid, |
23 | | - teardown_formatted_and_mounted_disk, |
24 | 22 | vm_image, |
25 | 23 | wait_for, |
26 | 24 | ) |
27 | | -from lib.netutil import is_ipv6 |
28 | 25 | from lib.host import Host |
| 26 | +from lib.netutil import is_ipv6 |
29 | 27 | from lib.pool import Pool |
30 | 28 | from lib.sr import SR |
31 | 29 | from lib.vm import VM, vm_cache_key_from_def |
|
34 | 32 | # Import package-scoped fixtures. Although we need to define them in a separate file so that we can |
35 | 33 | # then import them in individual packages to fix the buggy package scope handling by pytest, we also |
36 | 34 | # need to import them in the global conftest.py so that they are recognized as fixtures. |
37 | | -from pkgfixtures import formatted_and_mounted_ext4_disk, sr_disk_wiped |
38 | | - |
39 | 35 | from typing import Dict, Generator, Iterable |
40 | 36 |
|
41 | 37 | # Do we cache VMs? |
@@ -321,7 +317,7 @@ def xfail_on_xcpng_8_3(host, request): |
321 | 317 | @pytest.fixture(scope='session') |
322 | 318 | def host_no_ipv6(host): |
323 | 319 | if is_ipv6(host.hostname_or_ip): |
324 | | - pytest.skip(f"This test requires an IPv4 XCP-ng") |
| 320 | + pytest.skip("This test requires an IPv4 XCP-ng") |
325 | 321 |
|
326 | 322 | @pytest.fixture(scope="session") |
327 | 323 | def shared_sr(host): |
@@ -442,9 +438,7 @@ def vm_ref(request): |
442 | 438 | logging.info(">> No VM specified on CLI, and no default found in test definition. Using global default.") |
443 | 439 | ref = 'mini-linux-x86_64-bios' |
444 | 440 |
|
445 | | - if is_uuid(ref): |
446 | | - return ref |
447 | | - elif ref.startswith('http'): |
| 441 | + if is_uuid(ref) or ref.startswith('http'): |
448 | 442 | return ref |
449 | 443 | else: |
450 | 444 | return vm_image(ref) |
|
0 commit comments