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

@ -4,7 +4,12 @@ os:
- osx
go:
- go1.8
- tip
go_import_path: github.com/kataras/iris
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libgtk-3-dev libappindicator3-dev ; fi
install:
- go get ./...
# install test dependencies
- go get golang.org/x/tools/cmd/cover
- go get -v github.com/axw/gocov
- go install github.com/axw/gocov/gocov
script:
- gocov test | gocov report

View File

@ -251,7 +251,7 @@ Feature Overview
- OAuth, OAuth2 supporting 27+ popular websites
- JWT
- Basic Authentication
- HTTP Sessions
- HTTP Sessions
- Add / Remove trailing slash from the URL with option to redirect
- Redirect requests
- HTTP to HTTPS

View File

@ -136,7 +136,7 @@ func (w *GzipResponseWriter) ResetBody() {
w.chunks = w.chunks[0:0]
}
// Disable turns of the gzip compression for the next .Write's data,
// Disable turns off the gzip compression for the next .Write's data,
// if called then the contents are being written in plain form.
func (w *GzipResponseWriter) Disable() {
w.disabled = true

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)

View File

@ -1,3 +1,7 @@
// Copyright 2017 Gerasimos Maropoulos, ΓΜ. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package memstore contains a store which is just
// a collection of key-value entries with immutability capabilities.
//