Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/metabox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
run:
working-directory: metabox
needs: metabox_run_required
# use 20.04 as we need xenial containers support => cgroup v1
runs-on: ubuntu-20.04
env:
# Workaround to get loguru colored output
Expand All @@ -61,7 +62,13 @@ jobs:
lxc profile device add default root disk path=/ pool=metabox${{ matrix.os }}
lxc storage list
- name: Install dependencies
run: python3 -m pip install --upgrade pyopenssl pip setuptools
run: |
# Here we pull from pypi because we need a version that supports pyproject.toml
# urllib update is to bypass a req. fail due to dist-packages. Version is pinned
# to <2 because pylxd doesn't currently support >=2
# pyopenssl upgraded is necessary because pylxd doesn't support the old version
# of pyopenssl included in focal
python3 -m pip install --upgrade pyopenssl pip "setuptools==70.0.0" "urllib3==1.26.19"
- name: Install Metabox
run: python3 -m pip install -e .
- name: Run Metabox scenarios
Expand Down
2 changes: 1 addition & 1 deletion metabox/metabox/core/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def load_all():
"""Import all modules so the scenarios can be auto-loaded."""
path = metabox.scenarios.__path__
for loader, name, _ in pkgutil.walk_packages(path):
loader.find_module(name).load_module(name)
_ = loader.find_spec(name).loader.load_module()

def all_scenarios(self):
"""Return all available scenarios."""
Expand Down
2 changes: 1 addition & 1 deletion metabox/metabox/core/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def run(self):

# let's escape < from the output to avoid confusing loguru
# loguru assumes that <> is used for colorizing
output = scn.get_output_streams().strip().replace("<", "\<")
output = scn.get_output_streams().strip().replace("<", r"\<")

logger.error("Scenario output:\n" + output)
if self.hold_on_fail:
Expand Down
12 changes: 7 additions & 5 deletions metabox/metabox/metabox-provider/units/match-test-units.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ unit: template
template-resource: nested_direct_resource
template-unit: job
id: nested_generated_job_template_{nested_direct_resource}
template-id: nested_include_by_template_id
flags: simple
template-id: nested_include_by_template_id_target
plugin: shell
_summary: Used to test that template-id is used to match from nested part
command: true

Expand All @@ -59,13 +59,14 @@ id: nested_part_tests
_name: Test plan used as a nested_part by the match tp
bootstrap_include:
nested_indirect_resource
nested_direct_resource
include:
nested_direct_dependency
nested_indirect_dependency
nested_not_included
nested_target
nested_exclude_target
nested_include_by_template_id
nested_include_by_template_id_target

# note from here onward is copy paste till test plan :%s/nested/include/g

Expand Down Expand Up @@ -125,7 +126,7 @@ unit: template
template-resource: include_direct_resource
template-unit: job
id: include_generated_job_template_{include_direct_resource}
template-id: include_include_by_template_id
template-id: include_include_by_template_id_target
flags: simple
_summary: Used to test that template-id is used to match from include
command: true
Expand All @@ -137,14 +138,15 @@ id: stress_match
_name: Test plan used as a include_part by the match tp
bootstrap_include:
include_indirect_resource
include_direct_resource
include:
include_direct_dependency
include_indirect_dependency
include_not_included
include_target
include_exclude_target
include_launcher_removed_target
include_include_by_template_id
include_include_by_template_id_target
nested_part:
nested_part_tests
exclude:
Expand Down