Skip to content

Commit

Permalink
Only add marks for containers available for this os version
Browse files Browse the repository at this point in the history
  • Loading branch information
dcermak committed Oct 10, 2023
1 parent 6e2220a commit 207b092
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions bci_tester/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def create_BCI(
of the :py:class:`~pytest_container.DerivedContainer`
"""
build_tag_base = build_tag.rpartition("/")[2]
marks = [pytest.mark.__getattr__(build_tag_base.replace(":", "_"))]
marks = []
if extra_marks:
for m in extra_marks:
marks.append(m)
Expand All @@ -277,15 +277,22 @@ def create_BCI(
raise ValueError(
f"Invalid os version for a language or application stack container: {ver}"
)
marks.append(create_container_version_mark(available_versions))
# marks.append(create_container_version_mark(available_versions))
else:
marks.append(
create_container_version_mark(_DEFAULT_NONBASE_OS_VERSIONS)
)
available_versions = list(_DEFAULT_NONBASE_OS_VERSIONS)
# marks.append(
# create_container_version_mark(_DEFAULT_NONBASE_OS_VERSIONS)
# )

elif available_versions is not None:
if available_versions:
marks.append(create_container_version_mark(available_versions))

# only try to grab the mark from the build tag for containers that are
# available for this os version, otherwise we get bogus errors for missing
# marks
if OS_VERSION in (available_versions or []):
marks.append(pytest.mark.__getattr__(build_tag_base.replace(":", "_")))

if OS_VERSION == "tumbleweed":
if bci_type == ImageType.APPLICATION:
baseurl = (
Expand Down

0 comments on commit 207b092

Please sign in to comment.