Skip to content

Commit 7db3281

Browse files
committed
fixup! tests: add /debug endpoint to fakestore to allow interrupting downloads
1 parent 69708b0 commit 7db3281

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/lib/fakestore/store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func (s *Store) debugEndpoint(w http.ResponseWriter, req *http.Request) {
410410
}
411411

412412
if req.Method != http.MethodPost {
413-
w.WriteHeader(http.StatusMethodNotAllowed)
413+
w.WriteHeader(405) // Method Not Allowed
414414
return
415415
}
416416

tests/lib/fakestore/store/store_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,5 +1391,5 @@ func (s *storeTestSuite) TestDebugEndpointMethodNotAllowed(c *C) {
13911391
c.Assert(err, IsNil)
13921392
defer resp.Body.Close()
13931393

1394-
c.Assert(resp.StatusCode, Equals, http.StatusMethodNotAllowed)
1394+
c.Assert(resp.StatusCode, Equals, 405)
13951395
}

0 commit comments

Comments
 (0)