From 2f10ec27d05be03ffca8d3a79aab225b6540e2f3 Mon Sep 17 00:00:00 2001 From: Joe Gorse Date: Fri, 12 Aug 2016 15:26:23 -0400 Subject: [PATCH] Added an injectable error to the Service func --- registry/mock/mock.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/registry/mock/mock.go b/registry/mock/mock.go index 4c36cc3..90b667d 100644 --- a/registry/mock/mock.go +++ b/registry/mock/mock.go @@ -115,7 +115,9 @@ func (m *Mock) Services(options *registry.QueryOptions) (map[string][]string, er // Service lists the nodes in a given service func (m *Mock) Service(service, tag string, options *registry.QueryOptions) ([]*registry.CatalogService, error) { var c []*registry.CatalogService - + if service == "service_error_injection" { + return nil, errors.New("Service Error Injection") + } for r := range m.GetCatalog() { containsTag := false