aboutsummaryrefslogtreecommitdiff
path: root/test/kubernetes_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/kubernetes_test.go')
-rw-r--r--test/kubernetes_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/kubernetes_test.go b/test/kubernetes_test.go
index 83a7b65d2..2f4cb1c18 100644
--- a/test/kubernetes_test.go
+++ b/test/kubernetes_test.go
@@ -56,11 +56,11 @@ var testdataLookupSRV = []struct {
{"mynginx.any.coredns.local.", 1, 1}, // One SRV record, via wildcard namespace
{"someservicethatdoesnotexist.*.coredns.local.", 0, 0}, // Record does not exist with wildcard for namespace
{"someservicethatdoesnotexist.any.coredns.local.", 0, 0}, // Record does not exist with wildcard for namespace
- {"*.demo.coredns.local.", 1, 1}, // One SRV record, via wildcard
- {"any.demo.coredns.local.", 1, 1}, // One SRV record, via wildcard
+ {"*.demo.coredns.local.", 2, 2}, // Two (mynginx, webserver) SRV record, via wildcard
+ {"any.demo.coredns.local.", 2, 2}, // Two (mynginx, webserver) SRV record, via wildcard
{"*.test.coredns.local.", 0, 0}, // One SRV record, via wildcard that is not exposed
{"any.test.coredns.local.", 0, 0}, // One SRV record, via wildcard that is not exposed
- {"*.*.coredns.local.", 1, 1}, // One SRV record, via namespace and service wildcard
+ {"*.*.coredns.local.", 2, 2}, // Two SRV record, via namespace and service wildcard
}
func TestKubernetesIntegration(t *testing.T) {
@@ -89,7 +89,7 @@ func testLookupA(t *testing.T) {
corefile :=
`.:0 {
kubernetes coredns.local {
- endpoint http://localhost:8080
+ endpoint http://localhost:8080
namespaces demo
}
@@ -135,7 +135,7 @@ func testLookupSRV(t *testing.T) {
corefile :=
`.:0 {
kubernetes coredns.local {
- endpoint http://localhost:8080
+ endpoint http://localhost:8080
namespaces demo
}
`
@@ -171,10 +171,10 @@ func testLookupSRV(t *testing.T) {
}
if srvRecordCount != testData.SRVRecordCount {
- t.Errorf("Expected '%v' SRV records in response. Instead got '%v' SRV records. Test query string: '%v'", testData.SRVRecordCount, srvRecordCount, testData.Query)
+ t.Errorf("Expected '%v' SRV records in response. Instead got '%v' SRV records. Test query string: '%v', res: %v", testData.SRVRecordCount, srvRecordCount, testData.Query, res)
}
if len(res.Answer) != testData.TotalAnswerCount {
- t.Errorf("Expected '%v' records in answer section. Instead got '%v' records in answer section. Test query string: '%v'", testData.TotalAnswerCount, len(res.Answer), testData.Query)
+ t.Errorf("Expected '%v' records in answer section. Instead got '%v' records in answer section. Test query string: '%v', res: %v", testData.TotalAnswerCount, len(res.Answer), testData.Query, res)
}
}
}