diff options
author | 2018-06-02 19:48:39 +0100 | |
---|---|---|
committer | 2018-06-02 11:48:39 -0700 | |
commit | 22c0b30d5f7468c2477291419bee3e88dfba490c (patch) | |
tree | 1454e8de2c457fcc649a7712815a6a980526ee6b /plugin/pkg/singleflight/singleflight_test.go | |
parent | 3994d3a5a704aab10aa0e52fac8d60ac872ecaad (diff) | |
download | coredns-22c0b30d5f7468c2477291419bee3e88dfba490c.tar.gz coredns-22c0b30d5f7468c2477291419bee3e88dfba490c.tar.zst coredns-22c0b30d5f7468c2477291419bee3e88dfba490c.zip |
presubmit: Check errorf as well (#1845)
Uppercase all these test errors as well. And extend the presubmit to
check for these in the future. Also do a slightly smarter grep to only
get t.<something>. as (because dump regexp) this also grep over non test
files.
Diffstat (limited to 'plugin/pkg/singleflight/singleflight_test.go')
-rw-r--r-- | plugin/pkg/singleflight/singleflight_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/pkg/singleflight/singleflight_test.go b/plugin/pkg/singleflight/singleflight_test.go index d1d406e0b..a32e046db 100644 --- a/plugin/pkg/singleflight/singleflight_test.go +++ b/plugin/pkg/singleflight/singleflight_test.go @@ -48,7 +48,7 @@ func TestDoErr(t *testing.T) { t.Errorf("Do error = %v; want someErr", err) } if v != nil { - t.Errorf("unexpected non-nil value %#v", v) + t.Errorf("Unexpected non-nil value %#v", v) } } @@ -71,7 +71,7 @@ func TestDoDupSuppress(t *testing.T) { t.Errorf("Do error: %v", err) } if v.(string) != "bar" { - t.Errorf("got %q; want %q", v, "bar") + t.Errorf("Got %q; want %q", v, "bar") } wg.Done() }() @@ -80,6 +80,6 @@ func TestDoDupSuppress(t *testing.T) { c <- "bar" wg.Wait() if got := atomic.LoadInt32(&calls); got != 1 { - t.Errorf("number of calls = %d; want 1", got) + t.Errorf("Number of calls = %d; want 1", got) } } |