return error when zero services in mock registry

This commit is contained in:
Asim 2016-06-30 20:11:04 +01:00
parent 0190b1ab3a
commit 6aac602b31

View File

@ -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