mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 18:23:25 -05:00
presubmit: check for uppercase (#1774)
Another thing we can test automatically, we sorta settled on using an uppercase letter in in t.Log and t.Fatal calls. Let's just check for this.
This commit is contained in:
@@ -24,13 +24,13 @@ func testCase(t *testing.T, ex Exchanger, q, r *dns.Msg, datq, datr *msg.Builder
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(ctx.Trap) != 2 {
|
||||
t.Fatalf("messages: %d", len(ctx.Trap))
|
||||
t.Fatalf("Messages: %d", len(ctx.Trap))
|
||||
}
|
||||
if !test.MsgEqual(ctx.Trap[0], tapq) {
|
||||
t.Errorf("want: %v\nhave: %v", tapq, ctx.Trap[0])
|
||||
t.Errorf("Want: %v\nhave: %v", tapq, ctx.Trap[0])
|
||||
}
|
||||
if !test.MsgEqual(ctx.Trap[1], tapr) {
|
||||
t.Errorf("want: %v\nhave: %v", tapr, ctx.Trap[1])
|
||||
t.Errorf("Want: %v\nhave: %v", tapr, ctx.Trap[1])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ func buildPool(size int) ([]*healthcheck.UpstreamHost, func(), error) {
|
||||
for _, e := range errs {
|
||||
valErr += fmt.Sprintf("%v\n", e)
|
||||
}
|
||||
return nil, nil, fmt.Errorf("error at allocation of the pool : %v", valErr)
|
||||
return nil, nil, fmt.Errorf("Error at allocation of the pool : %v", valErr)
|
||||
}
|
||||
return ups, stopIt, nil
|
||||
}
|
||||
@@ -51,7 +51,7 @@ func TestGRPCStartupShutdown(t *testing.T) {
|
||||
|
||||
pool, closePool, err := buildPool(2)
|
||||
if err != nil {
|
||||
t.Fatalf("error creating the pool of upstream for the test : %s", err)
|
||||
t.Fatalf("Error creating the pool of upstream for the test : %s", err)
|
||||
}
|
||||
defer closePool()
|
||||
|
||||
@@ -91,7 +91,7 @@ func TestGRPCRunAQuery(t *testing.T) {
|
||||
|
||||
pool, closePool, err := buildPool(2)
|
||||
if err != nil {
|
||||
t.Fatalf("error creating the pool of upstream for the test : %s", err)
|
||||
t.Fatalf("Error creating the pool of upstream for the test : %s", err)
|
||||
}
|
||||
defer closePool()
|
||||
|
||||
@@ -131,7 +131,7 @@ func TestGRPCRunAQueryOnSecureLinkWithInvalidCert(t *testing.T) {
|
||||
|
||||
pool, closePool, err := buildPool(1)
|
||||
if err != nil {
|
||||
t.Fatalf("error creating the pool of upstream for the test : %s", err)
|
||||
t.Fatalf("Error creating the pool of upstream for the test : %s", err)
|
||||
}
|
||||
defer closePool()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user