Skip to content

Commit

Permalink
Fixed tests as now set produces inconsistent order
Browse files Browse the repository at this point in the history
  • Loading branch information
bo156 committed Jul 16, 2023
1 parent 4be5da5 commit 9698831
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/kubernetes/image_referencer/provider/test_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,18 @@ def test_extract_images_from_resources(graph_framework):
images = provider.extract_images_from_resources()

# then
assert images == [
Image(
assert len(images) == 2
nginx_image = Image(
file_path="/pod.yaml",
name="nginx",
start_line=1,
end_line=16,
related_resource_id="/pod.yaml:None",
),
Image(file_path="/pod.yaml", name="busybox", start_line=1, end_line=16, related_resource_id="/pod.yaml:None"),
]
)
busybox_image = Image(file_path="/pod.yaml", name="busybox", start_line=1, end_line=16,
related_resource_id="/pod.yaml:None")
assert nginx_image in images
assert busybox_image in images


@pytest.mark.parametrize("graph_framework", ['NETWORKX', 'IGRAPH'])
Expand Down

0 comments on commit 9698831

Please sign in to comment.