diff --git a/config/config_test.go b/config/config_test.go index 2c6b9bd1..f06fb9da 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -411,3 +411,22 @@ kubernetes: `)) t.Error("Function should've panicked because providing a service-template is mandatory") } + +func TestParseAndValidateConfigBytesWithKubernetesAutoDiscoveryUsingClusterModeIn(t *testing.T) { + defer func() { recover() }() + _, _ = parseAndValidateConfigBytes([]byte(` +kubernetes: + cluster-mode: "in" + auto-discover: true + service-template: + interval: 30s + conditions: + - "[STATUS] == 200" + namespaces: + - name: default + hostname-suffix: ".default.svc.cluster.local" + target-path: "/health" +`)) + // TODO: find a way to test this? + t.Error("Function should've panicked because testing with ClusterModeIn isn't supported") +}