1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

add gocov on travis

Former-commit-id: 99555baee1f5e8ea73b995a5f6476815fd62e0a4
This commit is contained in:
kataras
2017-06-10 04:21:55 +03:00
parent 26c315cdb1
commit c4788ee4e8
5 changed files with 16 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ func TestProxy(t *testing.T) {
// proxySrv.Downgrade(p.ServeHTTP)
// go proxySrv.Run(iris.Addr(":80"), iris.WithoutBanner, iris.WithoutInterruptHandler)
go host.NewProxy(":1193", u).ListenAndServe() // should be localhost/127.0.0.1:80 but travis throws permission denied.
go host.NewProxy("localhost:2017", u).ListenAndServe() // should be localhost/127.0.0.1:80 but travis throws permission denied.
app := iris.New()
app.Get("/", func(ctx context.Context) {
@@ -53,7 +53,7 @@ func TestProxy(t *testing.T) {
// main server
go app.Run(iris.Listener(httptest.NewLocalTLSListener(l)), iris.WithoutBanner)
e := httptest.NewInsecure(t, httptest.URL("http://localhost:1193"))
e := httptest.NewInsecure(t, httptest.URL("http://localhost:2017"))
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)