From 4aeaa9c5be67d1b5ec449d3073f4d825645d4788 Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Fri, 6 Sep 2024 09:59:05 +0700 Subject: [PATCH] Add a unittest for sidecar containers. --- unittests/deployment/sidecar-container.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 unittests/deployment/sidecar-container.yaml diff --git a/unittests/deployment/sidecar-container.yaml b/unittests/deployment/sidecar-container.yaml new file mode 100644 index 0000000..c30a5fe --- /dev/null +++ b/unittests/deployment/sidecar-container.yaml @@ -0,0 +1,20 @@ +suite: sidecar container +release: + name: gitea-unittests + namespace: testing +templates: + - templates/gitea/deployment.yaml +tests: + - it: supports adding a sidecar container + template: templates/gitea/deployment.yaml + set: + extraContainers: + - name: sidecar-bob + image: busybox + asserts: + - equal: + path: spec.template.spec.containers[0].name + value: "sidecar-bob" + - equal: + path: spec.template.spec.containers[0].image + value: "busybox"