use http consts for request methods

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-11-02 23:31:23 +01:00
parent 7f9f86c411
commit f9ccd2c6ea
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
33 changed files with 211 additions and 211 deletions

View file

@ -24,7 +24,7 @@ func TestUploadReadFrom(t *testing.T) {
m := testutil.RequestResponseMap([]testutil.RequestResponseMapping{
{
Request: testutil.Request{
Method: "GET",
Method: http.MethodGet,
Route: "/v2/",
},
Response: testutil.Response{
@ -37,7 +37,7 @@ func TestUploadReadFrom(t *testing.T) {
// Test Valid case
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -53,7 +53,7 @@ func TestUploadReadFrom(t *testing.T) {
// Test invalid range
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -69,7 +69,7 @@ func TestUploadReadFrom(t *testing.T) {
// Test 404
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -80,7 +80,7 @@ func TestUploadReadFrom(t *testing.T) {
// Test 400 valid json
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -101,7 +101,7 @@ func TestUploadReadFrom(t *testing.T) {
// Test 400 invalid json
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -113,7 +113,7 @@ func TestUploadReadFrom(t *testing.T) {
// Test 500
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -220,7 +220,7 @@ func TestUploadSize(t *testing.T) {
m := testutil.RequestResponseMap([]testutil.RequestResponseMapping{
{
Request: testutil.Request{
Method: "GET",
Method: http.MethodGet,
Route: "/v2/",
},
Response: testutil.Response{
@ -232,7 +232,7 @@ func TestUploadSize(t *testing.T) {
},
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: readFromLocationPath,
Body: b,
},
@ -247,7 +247,7 @@ func TestUploadSize(t *testing.T) {
},
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: writeLocationPath,
Body: b,
},
@ -310,7 +310,7 @@ func TestUploadWrite(t *testing.T) {
m := testutil.RequestResponseMap([]testutil.RequestResponseMapping{
{
Request: testutil.Request{
Method: "GET",
Method: http.MethodGet,
Route: "/v2/",
},
Response: testutil.Response{
@ -323,7 +323,7 @@ func TestUploadWrite(t *testing.T) {
// Test Valid case
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -339,7 +339,7 @@ func TestUploadWrite(t *testing.T) {
// Test invalid range
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -355,7 +355,7 @@ func TestUploadWrite(t *testing.T) {
// Test 404
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -366,7 +366,7 @@ func TestUploadWrite(t *testing.T) {
// Test 400 valid json
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -387,7 +387,7 @@ func TestUploadWrite(t *testing.T) {
// Test 400 invalid json
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},
@ -399,7 +399,7 @@ func TestUploadWrite(t *testing.T) {
// Test 500
{
Request: testutil.Request{
Method: "PATCH",
Method: http.MethodPatch,
Route: locationPath,
Body: b,
},