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