Improve test coverage

This commit is contained in:
TwinProduction 2020-11-11 18:11:30 -05:00
parent d4d4ca236a
commit 0909024e43

View File

@ -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")
}