1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 12:57:05 +00:00

fix #2158 and more

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-07-08 02:08:18 +03:00
parent 757e7fe61b
commit 6add1ba49b
79 changed files with 551 additions and 467 deletions

View File

@@ -68,7 +68,7 @@ func TestProxy(t *testing.T) {
go app.Run(iris.Listener(httptest.NewLocalTLSListener(l)), iris.WithoutStartupLog) // nolint:errcheck
e := httptest.NewInsecure(t, httptest.URL("http://"+listener.Addr().String()))
e.GET("/").Expect().Status(iris.StatusOK).Body().Equal(expectedIndex)
e.GET("/about").Expect().Status(iris.StatusOK).Body().Equal(expectedAbout)
e.GET("/notfound").Expect().Status(iris.StatusNotFound).Body().Equal(unexpectedRoute)
e.GET("/").Expect().Status(iris.StatusOK).Body().IsEqual(expectedIndex)
e.GET("/about").Expect().Status(iris.StatusOK).Body().IsEqual(expectedAbout)
e.GET("/notfound").Expect().Status(iris.StatusNotFound).Body().IsEqual(unexpectedRoute)
}

View File

@@ -93,7 +93,7 @@ func testSupervisor(t *testing.T, creator func(*http.Server, []func(TaskHost)) *
// http testsing and various calls
// no need for time sleep because the following will take some time by theirselves
tester := newTester(t, "http://"+addr, mux)
tester.Request("GET", "/").Expect().Status(http.StatusOK).Body().Equal(expectedBody)
tester.Request("GET", "/").Expect().Status(http.StatusOK).Body().IsEqual(expectedBody)
// WARNING: Data Race here because we try to read the logs
// but it's "safe" here.