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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user