From 0909024e4385d6d6406a3a7bc2505209f4483da7 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Wed, 11 Nov 2020 18:11:30 -0500 Subject: [PATCH] Improve test coverage --- config/config_test.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/config/config_test.go b/config/config_test.go index d515e86a..5b65db44 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -394,5 +394,18 @@ kubernetes: } } } - +} + +func TestParseAndValidateConfigBytesWithKubernetesAutoDiscoveryButNoServiceTemplate(t *testing.T) { + defer func() { recover() }() + _, _ = parseAndValidateConfigBytes([]byte(` +kubernetes: + cluster-mode: "mock" + auto-discover: true + namespaces: + - name: default + hostname-suffix: ".default.svc.cluster.local" + target-path: "/health" +`)) + t.Error("Function should've panicked because providing a service-template is mandatory") }