-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test both `quay.io/centos-bootc/{centos,fedora}-bootc:{eln,stre…
…am9}` Now that `bib` supports both fedora and centos bootc we need to start testing both as part of the integration suite.
- Loading branch information
Showing
4 changed files
with
45 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
|
||
|
||
def gen_testcases(what): | ||
# supported images that can be directly booted | ||
DIRECT_BOOT_IMAGE_TYPES = ("qcow2", "ami", "raw") | ||
|
||
# bootc containers that are tested by default | ||
CONTAINERS_TO_TEST = ( | ||
"quay.io/centos-bootc/fedora-bootc:eln", | ||
"quay.io/centos-bootc/centos-bootc:stream9", | ||
) | ||
# allow commandline override | ||
if os.getenv("BIB_TEST_BOOTC_CONTAINER_TAG"): | ||
CONTAINERS_TO_TEST = [os.getenv("BIB_TEST_BOOTC_CONTAINER_TAG")] | ||
|
||
if what == "manifest": | ||
return CONTAINERS_TO_TEST | ||
elif what == "ami-boot": | ||
return [cnt + ",ami" for cnt in CONTAINERS_TO_TEST] | ||
elif what == "direct-boot": | ||
test_cases = [] | ||
# this is (obviously) many test-cases, we could try to be smarter here | ||
# and only test subsets (e.g. fedora-bootc,qcow2 centos-bootc,raw) | ||
for cnt in CONTAINERS_TO_TEST: | ||
for img_type in DIRECT_BOOT_IMAGE_TYPES: | ||
test_cases.append(f"{cnt},{img_type}") | ||
return test_cases | ||
raise ValueError(f"unknown test-case type {what}") |