Skip to content

Commit

Permalink
Merge "Fix xdist tests issue with different tests collected"
Browse files Browse the repository at this point in the history
  • Loading branch information
MOS CI authored and Gerrit Code Review committed Feb 18, 2025
2 parents c01729e + 0a1103c commit c9dc525
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions tests/unit/test_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ def get_child_object_templates():
return res


@pytest.mark.parametrize("service,context", get_services_and_contexts())
@pytest.mark.parametrize(
"service,context", sorted(get_services_and_contexts())
)
@mock.patch.object(layers, "_get_dashboard_default_policy")
@mock.patch.object(layers, "_get_default_policy")
def test_render_service_template(
Expand Down Expand Up @@ -331,13 +333,13 @@ def test_render_service_template(
assert data == output, f"Mismatch when comparing to file {f.name}"


@pytest.mark.parametrize("size", get_sizes())
@pytest.mark.parametrize("size", sorted(get_sizes()))
def test_render_sezes(size):
layers.render_template(f"size/{size}")


@pytest.mark.parametrize(
"service,template,openstack_version", get_child_object_templates()
"service,template,openstack_version", sorted(get_child_object_templates())
)
@mock.patch.object(kube, "artifacts_configmap")
def test_render_child_object_template(
Expand All @@ -355,7 +357,7 @@ def test_render_child_object_template(


@pytest.mark.parametrize(
"service,template,openstack_version", get_child_object_templates()
"service,template,openstack_version", sorted(get_child_object_templates())
)
@mock.patch.object(kube, "artifacts_configmap")
def test_render_child_object_template_ensure_images(
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_resource_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_output_templates():
return res


@pytest.mark.parametrize("out_template", get_output_templates())
@pytest.mark.parametrize("out_template", sorted(get_output_templates()))
def test_network_policy_ingress(
out_template,
child_view,
Expand All @@ -33,7 +33,7 @@ def test_network_policy_ingress(
assert out == service_policies


@pytest.mark.parametrize("out_template", get_output_templates())
@pytest.mark.parametrize("out_template", sorted(get_output_templates()))
def test_network_policy_eggress(
out_template,
child_view,
Expand Down

0 comments on commit c9dc525

Please sign in to comment.