backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
slurp, err := ioutil.ReadAll(r.Body)
if err != nil {
- t.Error("Backend body read = %v", err)
+ t.Errorf("Backend body read = %v", err)
}
if len(slurp) != len(requestBody) {
t.Errorf("Backend read %d request body bytes; want %d", len(slurp), len(requestBody))
}
}
if !ok {
- t.Fatal("Failed to start up after %d tries", maxTries)
+ t.Fatalf("Failed to start up after %d tries", maxTries)
}
defer ln.Close()
c, err := tls.Dial("tcp", ln.Addr().String(), &tls.Config{
gone := w.(CloseNotifier).CloseNotify()
slurp, err := ioutil.ReadAll(reqBody)
if err != nil {
- t.Error("Body read: %v", err)
+ t.Errorf("Body read: %v", err)
return
}
if len(slurp) != len(requestBody) {