integration: use constants for http methods

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-12 20:42:02 +02:00
parent d1e837d2a8
commit 9ed58987ce
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -178,7 +178,7 @@ func TestAuthZPluginAPIDenyResponse(t *testing.T) {
conn, err := net.DialTimeout(daemonURL.Scheme, daemonURL.Path, time.Second*10)
assert.NilError(t, err)
c := httputil.NewClientConn(conn, nil)
req, err := http.NewRequest("GET", "/version", nil)
req, err := http.NewRequest(http.MethodGet, "/version", nil)
assert.NilError(t, err)
resp, err := c.Do(req)
@ -477,7 +477,7 @@ func TestAuthZPluginHeader(t *testing.T) {
conn, err := net.DialTimeout(daemonURL.Scheme, daemonURL.Path, time.Second*10)
assert.NilError(t, err)
client := httputil.NewClientConn(conn, nil)
req, err := http.NewRequest("GET", "/version", nil)
req, err := http.NewRequest(http.MethodGet, "/version", nil)
assert.NilError(t, err)
resp, err := client.Do(req)
assert.NilError(t, err)