(t *testing.T, returnIn time.Duration, counter *int32)
| 135 | } |
| 136 | |
| 137 | func fakeServer(t *testing.T, returnIn time.Duration, counter *int32) *httptest.Server { |
| 138 | server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { |
| 139 | time.Sleep(returnIn) |
| 140 | |
| 141 | atomic.AddInt32(counter, 1) |
| 142 | _, _ = w.Write([]byte(`{}`)) |
| 143 | })) |
| 144 | t.Cleanup(server.Close) |
| 145 | |
| 146 | return server |
| 147 | } |
| 148 | |
| 149 | func TestReadError(t *testing.T) { |
| 150 | // confirm blobNotFoundError converts to ErrDoesNotExist |
no test coverage detected