@@ -75,7 +75,7 @@ func TestHandler_addNonce(t *testing.T) {
75
75
tc := run (t )
76
76
t .Run (name , func (t * testing.T ) {
77
77
ctx := newBaseContext (context .Background (), tc .db )
78
- req := httptest .NewRequest ("GET" , u , nil ).WithContext (ctx )
78
+ req := httptest .NewRequest ("GET" , u , http . NoBody ).WithContext (ctx )
79
79
w := httptest .NewRecorder ()
80
80
addNonce (testNext )(w , req )
81
81
res := w .Result ()
@@ -127,7 +127,7 @@ func TestHandler_addDirLink(t *testing.T) {
127
127
for name , run := range tests {
128
128
tc := run (t )
129
129
t .Run (name , func (t * testing.T ) {
130
- req := httptest .NewRequest ("GET" , "/foo" , nil )
130
+ req := httptest .NewRequest ("GET" , "/foo" , http . NoBody )
131
131
req = req .WithContext (tc .ctx )
132
132
w := httptest .NewRecorder ()
133
133
addDirLink (testNext )(w , req )
@@ -230,7 +230,7 @@ func TestHandler_verifyContentType(t *testing.T) {
230
230
if tc .url != "" {
231
231
_u = tc .url
232
232
}
233
- req := httptest .NewRequest ("GET" , _u , nil )
233
+ req := httptest .NewRequest ("GET" , _u , http . NoBody )
234
234
req = req .WithContext (tc .ctx )
235
235
req .Header .Add ("Content-Type" , tc .contentType )
236
236
w := httptest .NewRecorder ()
@@ -298,7 +298,7 @@ func TestHandler_isPostAsGet(t *testing.T) {
298
298
tc := run (t )
299
299
t .Run (name , func (t * testing.T ) {
300
300
// h := &Handler{}
301
- req := httptest .NewRequest ("GET" , u , nil )
301
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
302
302
req = req .WithContext (tc .ctx )
303
303
w := httptest .NewRecorder ()
304
304
isPostAsGet (testNext )(w , req )
@@ -582,7 +582,7 @@ func TestHandler_verifyAndExtractJWSPayload(t *testing.T) {
582
582
tc := run (t )
583
583
t .Run (name , func (t * testing.T ) {
584
584
// h := &Handler{}
585
- req := httptest .NewRequest ("GET" , u , nil )
585
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
586
586
req = req .WithContext (tc .ctx )
587
587
w := httptest .NewRecorder ()
588
588
verifyAndExtractJWSPayload (tc .next )(w , req )
@@ -829,7 +829,7 @@ func TestHandler_lookupJWK(t *testing.T) {
829
829
tc := run (t )
830
830
t .Run (name , func (t * testing.T ) {
831
831
ctx := newBaseContext (tc .ctx , tc .db , tc .linker )
832
- req := httptest .NewRequest ("GET" , u , nil )
832
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
833
833
req = req .WithContext (ctx )
834
834
w := httptest .NewRecorder ()
835
835
lookupJWK (tc .next )(w , req )
@@ -1028,7 +1028,7 @@ func TestHandler_extractJWK(t *testing.T) {
1028
1028
tc := run (t )
1029
1029
t .Run (name , func (t * testing.T ) {
1030
1030
ctx := newBaseContext (tc .ctx , tc .db )
1031
- req := httptest .NewRequest ("GET" , u , nil )
1031
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
1032
1032
req = req .WithContext (ctx )
1033
1033
w := httptest .NewRecorder ()
1034
1034
extractJWK (tc .next )(w , req )
@@ -1403,7 +1403,7 @@ func TestHandler_validateJWS(t *testing.T) {
1403
1403
tc := run (t )
1404
1404
t .Run (name , func (t * testing.T ) {
1405
1405
ctx := newBaseContext (tc .ctx , tc .db )
1406
- req := httptest .NewRequest ("GET" , u , nil )
1406
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
1407
1407
req = req .WithContext (ctx )
1408
1408
w := httptest .NewRecorder ()
1409
1409
validateJWS (tc .next )(w , req )
@@ -1585,7 +1585,7 @@ func TestHandler_extractOrLookupJWK(t *testing.T) {
1585
1585
tc := prep (t )
1586
1586
t .Run (name , func (t * testing.T ) {
1587
1587
ctx := newBaseContext (tc .ctx , tc .db , tc .linker )
1588
- req := httptest .NewRequest ("GET" , u , nil )
1588
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
1589
1589
req = req .WithContext (ctx )
1590
1590
w := httptest .NewRecorder ()
1591
1591
extractOrLookupJWK (tc .next )(w , req )
@@ -1670,7 +1670,7 @@ func TestHandler_checkPrerequisites(t *testing.T) {
1670
1670
tc := run (t )
1671
1671
t .Run (name , func (t * testing.T ) {
1672
1672
ctx := acme .NewPrerequisitesCheckerContext (tc .ctx , tc .prerequisitesChecker )
1673
- req := httptest .NewRequest ("GET" , u , nil )
1673
+ req := httptest .NewRequest ("GET" , u , http . NoBody )
1674
1674
req = req .WithContext (ctx )
1675
1675
w := httptest .NewRecorder ()
1676
1676
checkPrerequisites (tc .next )(w , req )
0 commit comments