Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -46,7 +46,7 @@ func TestPeerCertificateMarshalJSON(t *testing.T) {
|
| 46 | 46 |
|
| 47 | 47 |
var certs = []*x509.Certificate{cert}
|
| 48 | 48 |
addr := "www.authz.com/auth" |
| 49 |
- req, err := http.NewRequest("GET", addr, nil)
|
|
| 49 |
+ req, err := http.NewRequest(http.MethodGet, addr, nil) |
|
| 50 | 50 |
assert.NilError(t, err) |
| 51 | 51 |
|
| 52 | 52 |
req.RequestURI = addr |
| ... | ... |
@@ -38,7 +38,7 @@ func TestAuthZRequestPluginError(t *testing.T) {
|
| 38 | 38 |
User: "user", |
| 39 | 39 |
RequestBody: []byte("sample body"),
|
| 40 | 40 |
RequestURI: "www.authz.com/auth", |
| 41 |
- RequestMethod: "GET", |
|
| 41 |
+ RequestMethod: http.MethodGet, |
|
| 42 | 42 |
RequestHeaders: map[string]string{"header": "value"},
|
| 43 | 43 |
} |
| 44 | 44 |
server.replayResponse = Response{
|
| ... | ... |
@@ -69,7 +69,7 @@ func TestAuthZRequestPlugin(t *testing.T) {
|
| 69 | 69 |
User: "user", |
| 70 | 70 |
RequestBody: []byte("sample body"),
|
| 71 | 71 |
RequestURI: "www.authz.com/auth", |
| 72 |
- RequestMethod: "GET", |
|
| 72 |
+ RequestMethod: http.MethodGet, |
|
| 73 | 73 |
RequestHeaders: map[string]string{"header": "value"},
|
| 74 | 74 |
} |
| 75 | 75 |
server.replayResponse = Response{
|
| ... | ... |
@@ -34,7 +34,7 @@ func TestMiddlewareWrapHandler(t *testing.T) {
|
| 34 | 34 |
assert.Assert(t, mdHandler != nil) |
| 35 | 35 |
|
| 36 | 36 |
addr := "www.example.com/auth" |
| 37 |
- req, _ := http.NewRequest("GET", addr, nil)
|
|
| 37 |
+ req, _ := http.NewRequest(http.MethodGet, addr, nil) |
|
| 38 | 38 |
req.RequestURI = addr |
| 39 | 39 |
req.Header.Add("header", "value")
|
| 40 | 40 |
|