|
15 | 15 |
|
16 | 16 | import pytest |
17 | 17 | # local test utils |
18 | | -import testutil |
19 | | -from containerbuild import build_container_fixture # pylint: disable=unused-import |
20 | | -from testcases import CLOUD_BOOT_IMAGE_TYPES, DISK_IMAGE_TYPES, gen_testcases |
21 | | -from vm import AWS, QEMU |
| 18 | +from test import testutil |
| 19 | +from .containerbuild import build_container_fixture # pylint: disable=unused-import |
| 20 | +from .testcases import CLOUD_BOOT_IMAGE_TYPES, DISK_IMAGE_TYPES, gen_testcases |
| 21 | +import vmtest.util |
| 22 | +from vmtest.vm import AWS_REGION, AWS, QEMU |
22 | 23 |
|
23 | 24 | if not testutil.has_executable("podman"): |
24 | 25 | pytest.skip("no podman, skipping integration tests that required podman", allow_module_level=True) |
@@ -113,7 +114,7 @@ def registry_conf_fixture(shared_tmpdir, request): |
113 | 114 | {local_registry}: |
114 | 115 | lookaside: file:///{sigstore_dir} |
115 | 116 | """ |
116 | | - registry_port = testutil.get_free_port() |
| 117 | + registry_port = vmtest.util.get_free_port() |
117 | 118 | # We cannot use localhost as we need to access the registry from both |
118 | 119 | # the host system and the bootc-image-builder container. |
119 | 120 | default_ip = testutil.get_ip_from_default_route() |
@@ -410,7 +411,7 @@ def build_images(shared_tmpdir, build_container, request, force_aws_upload, gpg_ |
410 | 411 |
|
411 | 412 | upload_args = [ |
412 | 413 | f"--aws-ami-name=bootc-image-builder-test-{str(uuid.uuid4())}", |
413 | | - f"--aws-region={testutil.AWS_REGION}", |
| 414 | + f"--aws-region={AWS_REGION}", |
414 | 415 | "--aws-bucket=bootc-image-builder-ci", |
415 | 416 | ] |
416 | 417 | elif force_aws_upload: |
@@ -492,7 +493,7 @@ def build_images(shared_tmpdir, build_container, request, force_aws_upload, gpg_ |
492 | 493 | metadata["ami_id"] = parse_ami_id_from_log(journal_output) |
493 | 494 |
|
494 | 495 | def del_ami(): |
495 | | - testutil.deregister_ami(metadata["ami_id"]) |
| 496 | + testutil.deregister_ami(metadata["ami_id"], AWS_REGION) |
496 | 497 | request.addfinalizer(del_ami) |
497 | 498 |
|
498 | 499 | journal_log_path.write_text(journal_output, encoding="utf8") |
|
0 commit comments