(t *testing.T)
| 122 | } |
| 123 | |
| 124 | func TestInternalHandler(t *testing.T) { |
| 125 | w := test.GetWorld(t) |
| 126 | tests := map[string]int{ |
| 127 | "/": http.StatusOK, |
| 128 | "/test-that-root-handler-returns-404": http.StatusNotFound, |
| 129 | "/no-http-storage/": http.StatusUnauthorized, |
| 130 | "/no-http-handler/": http.StatusUnauthorized, |
| 131 | "/bs-and-maybe-also-index/camli": http.StatusBadRequest, |
| 132 | "/bs/camli/sha1-b2201302e129a4396a323cb56283cddeef11bbe8": http.StatusNotFound, |
| 133 | "/no-http-storage/camli/sha1-b2201302e129a4396a323cb56283cddeef11bbe8": http.StatusUnauthorized, |
| 134 | } |
| 135 | for suffix, want := range tests { |
| 136 | res, err := http.Get(w.ServerBaseURL() + suffix) |
| 137 | if err != nil { |
| 138 | t.Fatalf("On %s: %v", suffix, err) |
| 139 | } |
| 140 | if res.StatusCode != want { |
| 141 | t.Errorf("For %s: Status = %d; want %d", suffix, res.StatusCode, want) |
| 142 | } |
| 143 | res.Body.Close() |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | func TestNoTestingLinking(t *testing.T) { |
| 148 | w, err := test.NewWorld() |
nothing calls this directly
no test coverage detected