This commit is contained in:
Gerasimos (Makis) Maropoulos 2021-02-19 09:06:22 +02:00
parent efcdd4b9e5
commit 0081171aa6
No known key found for this signature in database
GPG Key ID: A771A828097B36C7
3 changed files with 3 additions and 2 deletions

View File

@ -90,7 +90,7 @@ func TestEmbeddingFilesIntoApp(t *testing.T) {
e.GET(url).Expect(). e.GET(url).Expect().
Status(httptest.StatusOK). Status(httptest.StatusOK).
ContentType(u.contentType(), app.ConfigurationReadOnly().GetCharset()). ContentType(u.contentType()).
Body().Equal(contents) Body().Equal(contents)
} }
} }

View File

@ -56,6 +56,7 @@ func (r resource) loadFromBase(dir string) string {
if runtime.GOOS != "windows" { if runtime.GOOS != "windows" {
result = strings.ReplaceAll(result, "\n", "\r\n") result = strings.ReplaceAll(result, "\n", "\r\n")
result = strings.ReplaceAll(result, "\r\r", "")
} }
return result return result
} }

View File

@ -30,7 +30,7 @@ func TestJSONLogger(t *testing.T) {
app.Get("/ping", ping) app.Get("/ping", ping)
const expectedLogStr = `{"level":"debug","message":"Request path: /ping","fields":{"request_id":null},"stacktrace":[{"function":"json-logger/ping","source":"C:/mygopath/src/github.com/kataras/iris/_examples/logging/json-logger/main.go:78"}]}` const expectedLogStr = `{"level":"debug","message":"Request path: /ping","fields":{"request_id":null},"stacktrace":[{"function":"json-logger/ping","source":"/home/runner/work/iris/iris/_examples/logging/json-logger/main.go:78"}]}` // gh actions-specific.
e := httptest.New(t, app, httptest.LogLevel("debug")) e := httptest.New(t, app, httptest.LogLevel("debug"))
wg := new(sync.WaitGroup) wg := new(sync.WaitGroup)
wg.Add(iters) wg.Add(iters)