Skip to content

Commit 69c9266

Browse files
committed
Fix http path context
1 parent d604c64 commit 69c9266

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

handle_actions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func (a ActionSendHTTP) Perform(ctx Context) error {
5050
}
5151

5252
request := gorequest.New().
53+
SetDebug(true).
5354
SetLogger(newOmLogger(ctx)).
5455
CustomMethod(a.Method, urlStr)
5556

http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (om *OpenMock) startHTTP() {
4242
HTTPContext: ec,
4343
HTTPHeader: ec.Request().Header,
4444
HTTPBody: string(body),
45-
HTTPPath: ec.Path(),
45+
HTTPPath: ec.Request().URL.String(),
4646
HTTPQueryString: ec.QueryString(),
4747
om: om,
4848
}

openmock.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package openmock
22

33
import (
44
"log"
5-
"os"
65

76
"github.com/caarlos0/env"
87
"github.com/goombaio/orderedmap"
@@ -82,8 +81,7 @@ func (om *OpenMock) SetupLogrus() {
8281
logrus.WithField("err", err).Fatalf("failed to set logrus level:%s", om.LogLevel)
8382
}
8483
logrus.SetLevel(l)
85-
logrus.SetOutput(os.Stdout)
86-
logrus.SetReportCaller(true)
84+
logrus.SetFormatter(&logrus.JSONFormatter{})
8785
}
8886

8987
func (om *OpenMock) SetupRepo() {
@@ -101,7 +99,6 @@ func (om *OpenMock) SetupRepo() {
10199
func (om *OpenMock) Start() {
102100
om.SetupLogrus()
103101
om.SetupRepo()
104-
105102
om.SetRedis()
106103

107104
err := om.Load()

0 commit comments

Comments
 (0)