Browse Source

Review comments

kegan/tests-prep
Kegan Dougal 8 years ago
parent
commit
352d741558
  1. 2
      hooks/pre-commit
  2. 6
      src/github.com/matrix-org/go-neb/goneb_services_test.go

2
hooks/pre-commit

@ -6,4 +6,4 @@ golint src/...
go fmt ./src/...
go tool vet --shadow ./src
gocyclo -over 12 src/
gb test
gb test -timeout 5s

6
src/github.com/matrix-org/go-neb/goneb_services_test.go

@ -2,10 +2,10 @@ package main
import (
"bytes"
"fmt"
"net/http"
"net/http/httptest"
"os"
"strconv"
"testing"
)
@ -20,8 +20,8 @@ func (rt MockTripper) RoundTrip(req *http.Request) (*http.Response, error) {
h := rt.handlers[key]
if h == nil {
panic(
"Test RoundTrip: Unhandled request: " + key + "\n" +
"Handlers: " + strconv.Itoa(len(rt.handlers)),
fmt.Sprintf("Test RoundTrip: Unhandled request: %s\nHandlers: %d",
key, len(rt.handlers)),
)
}
return h(req)

Loading…
Cancel
Save