chore: rename MockContext to ContextMock and move it to a dedicated go file

This commit is contained in:
Julien Neuhart
2022-02-09 16:09:48 +01:00
parent c61c33f71c
commit 263d634801
8 changed files with 316 additions and 303 deletions

View File

@@ -252,7 +252,7 @@ func TestWebhookMiddlewareGuards(t *testing.T) {
c := srv.NewContext(tc.request, httptest.NewRecorder())
ctx := &api.MockContext{Context: &api.Context{}}
ctx := &api.ContextMock{Context: &api.Context{}}
ctx.SetEchoContext(c)
c.Set("context", ctx.Context)
@@ -399,7 +399,7 @@ func TestWebhookMiddlewareAsynchronousProcess(t *testing.T) {
c.Set("trace", "foo")
c.Set("startTime", time.Now())
ctx := &api.MockContext{Context: &api.Context{}}
ctx := &api.ContextMock{Context: &api.Context{}}
ctx.SetLogger(zap.NewNop())
ctx.SetEchoContext(c)