Skip to content

Commit

Permalink
Run go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oskirby committed Jul 12, 2024
1 parent ec81360 commit 527fba3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (testcase *HandlerTestCase) NewRequest(t *testing.T) *http.Request {
return req
}

func (testcase* HandlerTestCase) ValidateResponse(t *testing.T, w *httptest.ResponseRecorder) {
func (testcase *HandlerTestCase) ValidateResponse(t *testing.T, w *httptest.ResponseRecorder) {
if w.Code != testcase.expectedStatus {
t.Fatalf("test case %s: got code %d but expected %d",
testcase.name, w.Code, testcase.expectedStatus)
Expand All @@ -116,10 +116,10 @@ func (testcase* HandlerTestCase) ValidateResponse(t *testing.T, w *httptest.Resp
}
}

func (testcase* HandlerTestCase) Run(t *testing.T, handler func(http.ResponseWriter, *http.Request)) {
func (testcase *HandlerTestCase) Run(t *testing.T, handler func(http.ResponseWriter, *http.Request)) {
// test request setup
var req = testcase.NewRequest(t)

// run the request
w := httptest.NewRecorder()
handler(w, req)
Expand All @@ -128,7 +128,6 @@ func (testcase* HandlerTestCase) Run(t *testing.T, handler func(http.ResponseWri
testcase.ValidateResponse(t, w)
}


func TestBadRequest(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -667,7 +666,7 @@ func TestHandleGetAuthKeyIDs(t *testing.T) {

const autographDevAliceKeyIDsJSON = "[\"apk_cert_with_ecdsa_sha256\",\"apk_cert_with_ecdsa_sha256_v3\",\"appkey1\",\"appkey2\",\"dummyrsa\",\"dummyrsapss\",\"extensions-ecdsa\",\"extensions-ecdsa-expired-chain\",\"legacy_apk_with_rsa\",\"normandy\",\"pgpsubkey\",\"pgpsubkey-debsign\",\"randompgp\",\"randompgp-debsign\",\"remote-settings\",\"testapp-android\",\"testapp-android-legacy\",\"testapp-android-v3\",\"testauthenticode\",\"testmar\",\"testmarecdsa\",\"webextensions-rsa\",\"webextensions-rsa-with-recommendation\"]"

var testcases = []HandlerTestCase {
var testcases = []HandlerTestCase{
{
name: "invalid method POST returns 405",
method: "POST",
Expand Down Expand Up @@ -824,7 +823,7 @@ mYigBlwySY+gTqsjuIrydWlKaOv1GU+PXbwX0cQuaN8=
t.Fatal(err)
}

var testcases = []HandlerTestCase {
var testcases = []HandlerTestCase{
{
name: "invalid method POST returns 405",
method: "POST",
Expand Down

0 comments on commit 527fba3

Please sign in to comment.