Skip to content

Commit 3a6440a

Browse files
committed
test(api_server): authenticate the unknown-txid callback test
PR #121 (issue #91) added TestHandleCallback_UnknownTxid_NoPhantomRow without the bearer header that PR #112 (issue #76) made mandatory on the callback endpoint, so the test was failing on every PR rebased onto main. Use the existing authedCallbackRequest helper.
1 parent eca949b commit 3a6440a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

services/api_server/handlers_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,7 @@ func TestHandleCallback_UnknownTxid_NoPhantomRow(t *testing.T) {
398398
}
399399
body := mustMarshalJSON(t, payload)
400400

401-
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/v1/merkle-service/callback", bytes.NewReader(body))
402-
req.Header.Set("Content-Type", "application/json")
401+
req := authedCallbackRequest(t, body)
403402
w := httptest.NewRecorder()
404403

405404
router.ServeHTTP(w, req)

0 commit comments

Comments
 (0)