Skip to content

Commit

Permalink
Remove unsupported DNS calls from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Aug 4, 2016
1 parent 985779c commit 69a7249
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions test/extended/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func createEndpointSpec(name string) *api.Endpoints {
Subsets: []api.EndpointSubset{
{
Addresses: []api.EndpointAddress{
{IP: "1.1.1.1"},
{IP: "1.1.1.1", Hostname: "endpoint1"},
{IP: "1.1.1.2"},
},
NotReadyAddresses: []api.EndpointAddress{
Expand Down Expand Up @@ -272,12 +272,14 @@ var _ = Describe("DNS", func() {

// the DNS pod should be able to look up endpoints for names and wildcards
digForARecords(map[string][]string{
"kubernetes.default.endpoints": kubeEndpoints,
"prefix.kubernetes.default.endpoints.cluster.local": kubeEndpoints,
"kubernetes.default.endpoints": kubeEndpoints,

fmt.Sprintf("headless.%s.svc", f.Namespace.Name): readyEndpoints,
fmt.Sprintf("headless.%s.endpoints", f.Namespace.Name): readyEndpoints,
fmt.Sprintf("clusterip.%s.endpoints", f.Namespace.Name): readyEndpoints,

fmt.Sprintf("endpoint1.headless.%s.endpoints", f.Namespace.Name): {"1.1.1.1"},
fmt.Sprintf("endpoint1.clusterip.%s.endpoints", f.Namespace.Name): {"1.1.1.1"},
}, expect),

// the DNS pod should respond to its own request
Expand Down
6 changes: 3 additions & 3 deletions test/integration/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestDNS(t *testing.T) {
Subsets: []kapi.EndpointSubset{{
Addresses: []kapi.EndpointAddress{{IP: "172.0.0.1"}},
Ports: []kapi.EndpointPort{
{Port: 2345},
{Port: 2345, Name: "http"},
},
}},
}); err != nil {
Expand Down Expand Up @@ -187,7 +187,7 @@ func TestDNS(t *testing.T) {
expect: []*net.IP{&headlessIP},
},
{ // specific port of a headless service
dnsQuestionName: "unknown-port-2345.e1.headless.default.svc.cluster.local.",
dnsQuestionName: "_http._tcp.headless.default.svc.cluster.local.",
expect: []*net.IP{&headlessIP},
},
{ // SRV record for that service
Expand All @@ -209,7 +209,7 @@ func TestDNS(t *testing.T) {
},
},
{ // the SRV record resolves to the IP
dnsQuestionName: "unknown-port-2345.e1.headless.default.svc.cluster.local.",
dnsQuestionName: "_http._tcp.headless.default.svc.cluster.local.",
expect: []*net.IP{&headlessIP},
},
{ // headless 2 service
Expand Down

0 comments on commit 69a7249

Please sign in to comment.