From 1707c56fd11df1069ad034be63234e09a326a323 Mon Sep 17 00:00:00 2001 From: Karitham Date: Mon, 27 May 2024 09:36:07 +0200 Subject: [PATCH] add a test asserting both ssh and http services exist I'm not sure how to better test this, feel free to fix it or let me know of better ways --- unittests/deployment/svc-configuration.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/unittests/deployment/svc-configuration.yaml b/unittests/deployment/svc-configuration.yaml index 9ebffca..24059ea 100644 --- a/unittests/deployment/svc-configuration.yaml +++ b/unittests/deployment/svc-configuration.yaml @@ -104,3 +104,15 @@ tests: - equal: path: spec.loadBalancerIP value: "1.2.3.4" + + - it: both ssh and http services exist + templates: + - templates/gitea/ssh-svc.yaml + - templates/gitea/http-svc.yaml + asserts: + - matchRegex: + path: metadata.name + pattern: "^gitea-unittests-(?:ssh|http)$" + - matchRegex: + path: spec.ports[0].name + pattern: "^(?:ssh|http)$"