return error when zero services in mock registry
This commit is contained in:
@@ -60,7 +60,7 @@ func (m *mockRegistry) init() {
|
||||
|
||||
func (m *mockRegistry) GetService(service string) ([]*registry.Service, error) {
|
||||
s, ok := m.Services[service]
|
||||
if !ok {
|
||||
if !ok || len(s) == 0 {
|
||||
return nil, registry.ErrNotFound
|
||||
}
|
||||
return s, nil
|
||||
|
Reference in New Issue
Block a user