compress empty implementations to single line (#740)

This commit is contained in:
Chris O'Haver 2017-06-16 12:11:53 -04:00 committed by Miek Gieben
parent 5942f5dd5b
commit 7219bff11f
2 changed files with 7 additions and 22 deletions

View file

@ -282,13 +282,9 @@ func TestIpFromPodName(t *testing.T) {
type APIConnServiceTest struct{} type APIConnServiceTest struct{}
func (APIConnServiceTest) Run() { func (APIConnServiceTest) Run() { return }
return func (APIConnServiceTest) Stop() error { return nil }
} func (APIConnServiceTest) PodIndex(string) []interface{} { return nil }
func (APIConnServiceTest) Stop() error {
return nil
}
func (APIConnServiceTest) ServiceList() []*api.Service { func (APIConnServiceTest) ServiceList() []*api.Service {
svcs := []*api.Service{ svcs := []*api.Service{
@ -334,10 +330,6 @@ func (APIConnServiceTest) ServiceList() []*api.Service {
} }
func (APIConnServiceTest) PodIndex(string) []interface{} {
return nil
}
func (APIConnServiceTest) EndpointsList() api.EndpointsList { func (APIConnServiceTest) EndpointsList() api.EndpointsList {
n := "test.node.foo.bar" n := "test.node.foo.bar"
@ -437,6 +429,7 @@ func (APIConnServiceTest) GetNodeByName(name string) (api.Node, error) {
}, },
}, nil }, nil
} }
func TestServices(t *testing.T) { func TestServices(t *testing.T) {
k := Kubernetes{Zones: []string{"interwebs.test"}} k := Kubernetes{Zones: []string{"interwebs.test"}}

View file

@ -55,13 +55,9 @@ func TestIsDefaultNS(t *testing.T) {
type APIConnTest struct{} type APIConnTest struct{}
func (APIConnTest) Run() { func (APIConnTest) Run() { return }
return func (APIConnTest) Stop() error { return nil }
} func (APIConnTest) PodIndex(string) []interface{} { return nil }
func (APIConnTest) Stop() error {
return nil
}
func (APIConnTest) ServiceList() []*api.Service { func (APIConnTest) ServiceList() []*api.Service {
svc := api.Service{ svc := api.Service{
@ -78,10 +74,6 @@ func (APIConnTest) ServiceList() []*api.Service {
} }
func (APIConnTest) PodIndex(string) []interface{} {
return nil
}
func (APIConnTest) EndpointsList() api.EndpointsList { func (APIConnTest) EndpointsList() api.EndpointsList {
return api.EndpointsList{ return api.EndpointsList{
Items: []api.Endpoints{ Items: []api.Endpoints{