mirror of
https://github.com/versity/versitygw.git
synced 2026-05-12 15:01:27 +00:00
fix: fixed responce test cases
This commit is contained in:
@@ -651,7 +651,6 @@ func Test_responce(t *testing.T) {
|
||||
err error
|
||||
}
|
||||
app := fiber.New()
|
||||
ctx := app.AcquireCtx(&fasthttp.RequestCtx{})
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -662,7 +661,7 @@ func Test_responce(t *testing.T) {
|
||||
{
|
||||
name: "Internal-server-error",
|
||||
args: args{
|
||||
ctx: ctx,
|
||||
ctx: app.AcquireCtx(&fasthttp.RequestCtx{}),
|
||||
resp: nil,
|
||||
err: s3err.GetAPIError(16),
|
||||
},
|
||||
@@ -672,7 +671,7 @@ func Test_responce(t *testing.T) {
|
||||
{
|
||||
name: "Error-not-implemented",
|
||||
args: args{
|
||||
ctx: ctx,
|
||||
ctx: app.AcquireCtx(&fasthttp.RequestCtx{}),
|
||||
resp: nil,
|
||||
err: s3err.GetAPIError(50),
|
||||
},
|
||||
@@ -682,20 +681,21 @@ func Test_responce(t *testing.T) {
|
||||
{
|
||||
name: "Invalid-request-body",
|
||||
args: args{
|
||||
ctx: ctx,
|
||||
ctx: app.AcquireCtx(&fasthttp.RequestCtx{}),
|
||||
resp: make(chan int),
|
||||
err: nil,
|
||||
},
|
||||
wantErr: true,
|
||||
statusCode: 501,
|
||||
statusCode: 200,
|
||||
},
|
||||
{
|
||||
name: "Successful-response",
|
||||
args: args{
|
||||
ctx: ctx,
|
||||
ctx: app.AcquireCtx(&fasthttp.RequestCtx{}),
|
||||
resp: "Valid response",
|
||||
err: nil,
|
||||
},
|
||||
wantErr: false,
|
||||
statusCode: 200,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user