Ensure all values are used or _

This commit is contained in:
Brian Brazil 2017-10-09 16:53:24 +01:00
parent 8740fcc657
commit ee88f0d222
2 changed files with 5 additions and 2 deletions

View File

@ -253,7 +253,7 @@ func (g *Group) copyState(from *Group) {
}
for i, rule := range g.rules {
indexes, ok := ruleMap[rule.Name()]
indexes, _ := ruleMap[rule.Name()]
if len(indexes) == 0 {
continue
}

View File

@ -61,13 +61,16 @@ func TestStoreHTTPErrorHandling(t *testing.T) {
serverURL, err := url.Parse(server.URL)
if err != nil {
panic(err)
t.Fatal(err)
}
c, err := NewClient(0, &clientConfig{
url: &config.URL{serverURL},
timeout: model.Duration(time.Second),
})
if err != nil {
t.Fatal(err)
}
err = c.Store(nil)
if !reflect.DeepEqual(err, test.err) {