diff --git a/rules/manager.go b/rules/manager.go index 5818e2b7d..29b7cf62d 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -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 } diff --git a/storage/remote/client_test.go b/storage/remote/client_test.go index 32a2ae320..c8ced84bc 100644 --- a/storage/remote/client_test.go +++ b/storage/remote/client_test.go @@ -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) {