Skip to content

Commit

Permalink
test: add rootfs argument to ImageBuildResult
Browse files Browse the repository at this point in the history
We'll use the rootfs argument of the test case to determine the
partitions that are expected when verifying the built image.

In the future it might be more convenient to include the whole
configuration in the ImageBuildResult to perform more functional tests
on the image.
  • Loading branch information
achilleas-k committed Aug 9, 2024
1 parent d428058 commit 965a2ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ImageBuildResult(NamedTuple):
img_path: str
img_arch: str
container_ref: str
rootfs: str
username: str
password: str
ssh_keyfile_private_path: str
Expand Down Expand Up @@ -159,7 +160,7 @@ def build_images(shared_tmpdir, build_container, request, force_aws_upload):
journal_output = journal_log_path.read_text(encoding="utf8")
bib_output = bib_output_path.read_text(encoding="utf8")
results.append(ImageBuildResult(
image_type, generated_img, tc.target_arch, tc.container_ref,
image_type, generated_img, tc.target_arch, tc.container_ref, tc.rootfs,
username, password, ssh_keyfile_private_path,
kargs, bib_output, journal_output))

Expand Down Expand Up @@ -299,7 +300,7 @@ def del_ami():
results = []
for image_type in image_types:
results.append(ImageBuildResult(
image_type, artifact[image_type], tc.target_arch, tc.container_ref,
image_type, artifact[image_type], tc.target_arch, tc.container_ref, tc.rootfs,
username, password, ssh_keyfile_private_path,
kargs, bib_output, journal_output, metadata))
yield results
Expand Down

0 comments on commit 965a2ba

Please sign in to comment.