mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 09:14:17 -04:00
committed by
Chris O'Haver
parent
c8fb66f8cc
commit
6ed88fab74
@@ -16,24 +16,22 @@ type APIConnFederationTest struct {
|
||||
func (APIConnFederationTest) HasSynced() bool { return true }
|
||||
func (APIConnFederationTest) Run() { return }
|
||||
func (APIConnFederationTest) Stop() error { return nil }
|
||||
func (APIConnFederationTest) SvcIndexReverse(string) *object.Service { return nil }
|
||||
func (APIConnFederationTest) EpIndexReverse(string) *object.Endpoints { return nil }
|
||||
func (APIConnFederationTest) SvcIndexReverse(string) []*object.Service { return nil }
|
||||
func (APIConnFederationTest) EpIndexReverse(string) []*object.Endpoints { return nil }
|
||||
func (APIConnFederationTest) Modified() int64 { return 0 }
|
||||
func (APIConnFederationTest) SetWatchChan(watch.Chan) {}
|
||||
func (APIConnFederationTest) Watch(string) error { return nil }
|
||||
func (APIConnFederationTest) StopWatching(string) {}
|
||||
|
||||
|
||||
func (APIConnFederationTest) PodIndex(string) []*object.Pod {
|
||||
return []*object.Pod{
|
||||
{Namespace: "podns", PodIP: "10.240.0.1"}, // Remote IP set in test.ResponseWriter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func (APIConnFederationTest) SvcIndex(key string) *object.Service {
|
||||
svcs := map[string]*object.Service{
|
||||
"testns/svc1": {
|
||||
func (APIConnFederationTest) SvcIndex(string) []*object.Service {
|
||||
svcs := []*object.Service{
|
||||
{
|
||||
Name: "svc1",
|
||||
Namespace: "testns",
|
||||
ClusterIP: "10.0.0.1",
|
||||
@@ -41,12 +39,12 @@ func (APIConnFederationTest) SvcIndex(key string) *object.Service {
|
||||
{Name: "http", Protocol: "tcp", Port: 80},
|
||||
},
|
||||
},
|
||||
"testns/hdls1": {
|
||||
{
|
||||
Name: "hdls1",
|
||||
Namespace: "testns",
|
||||
ClusterIP: api.ClusterIPNone,
|
||||
},
|
||||
"testns/external": {
|
||||
{
|
||||
Name: "external",
|
||||
Namespace: "testns",
|
||||
ExternalName: "ext.interwebs.test",
|
||||
@@ -55,10 +53,9 @@ func (APIConnFederationTest) SvcIndex(key string) *object.Service {
|
||||
},
|
||||
},
|
||||
}
|
||||
return svcs[key]
|
||||
return svcs
|
||||
}
|
||||
|
||||
|
||||
func (APIConnFederationTest) ServiceList() []*object.Service {
|
||||
svcs := []*object.Service{
|
||||
{
|
||||
@@ -86,9 +83,9 @@ func (APIConnFederationTest) ServiceList() []*object.Service {
|
||||
return svcs
|
||||
}
|
||||
|
||||
func (APIConnFederationTest) EpIndex(key string) *object.Endpoints {
|
||||
eps := map[string]*object.Endpoints{
|
||||
"testns/svc1": {
|
||||
func (APIConnFederationTest) EpIndex(string) []*object.Endpoints {
|
||||
eps := []*object.Endpoints{
|
||||
{
|
||||
Subsets: []object.EndpointSubset{
|
||||
{
|
||||
Addresses: []object.EndpointAddress{
|
||||
@@ -103,7 +100,7 @@ func (APIConnFederationTest) EpIndex(key string) *object.Endpoints {
|
||||
Namespace: "testns",
|
||||
},
|
||||
}
|
||||
return eps[key]
|
||||
return eps
|
||||
}
|
||||
|
||||
func (APIConnFederationTest) EndpointsList() []*object.Endpoints {
|
||||
|
||||
Reference in New Issue
Block a user