From 8a658716d7820080a4348f71e0c1723a0d95574b Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Thu, 21 Dec 2023 04:07:24 +0000 Subject: [PATCH] Add additional test coverage for mutliple images --- tests/test_image.py | 2 +- tests/testdata/cluster8/apps/kustomization.yaml | 2 +- .../cluster8/apps/{pod-pvc.yaml => pods.yaml} | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) rename tests/testdata/cluster8/apps/{pod-pvc.yaml => pods.yaml} (66%) diff --git a/tests/test_image.py b/tests/test_image.py index 613b4544..7aa850b3 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -18,7 +18,7 @@ [ ( CWD / "tests/testdata/cluster8", - {"flux-system/apps": {"alpine"}}, + {"flux-system/apps": {"alpine", "busybox"}}, ), ( CWD / "tests/testdata/cluster7", diff --git a/tests/testdata/cluster8/apps/kustomization.yaml b/tests/testdata/cluster8/apps/kustomization.yaml index 099b91b4..1673237b 100644 --- a/tests/testdata/cluster8/apps/kustomization.yaml +++ b/tests/testdata/cluster8/apps/kustomization.yaml @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - pod-pvc.yaml + - pods.yaml diff --git a/tests/testdata/cluster8/apps/pod-pvc.yaml b/tests/testdata/cluster8/apps/pods.yaml similarity index 66% rename from tests/testdata/cluster8/apps/pod-pvc.yaml rename to tests/testdata/cluster8/apps/pods.yaml index 13e9d1cf..73e7d7e2 100644 --- a/tests/testdata/cluster8/apps/pod-pvc.yaml +++ b/tests/testdata/cluster8/apps/pods.yaml @@ -17,3 +17,15 @@ spec: name: task-pv-storage command: ["/bin/sh"] args: ["-c", "sleep 500000"] +--- +apiVersion: v1 +kind: Pod +metadata: + name: sleep + namespace: home +spec: + initContainers: + - name: sleep + image: busybox + command: ["/bin/sh"] + args: ["-c", "sleep 500000"] \ No newline at end of file