From c4788ee4e89834b627618ac9485e0d6cb637e689 Mon Sep 17 00:00:00 2001 From: kataras Date: Sat, 10 Jun 2017 04:21:55 +0300 Subject: [PATCH] add gocov on travis Former-commit-id: 99555baee1f5e8ea73b995a5f6476815fd62e0a4 --- .travis.yml | 11 ++++++++--- README.md | 2 +- context/gzip_response_writer.go | 2 +- core/host/proxy_test.go | 4 ++-- core/memstore/memstore.go | 4 ++++ 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 84d1e298..a73f0300 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/README.md b/README.md index dbb53e46..def88d57 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/context/gzip_response_writer.go b/context/gzip_response_writer.go index a1db2d20..ac3a7142 100644 --- a/context/gzip_response_writer.go +++ b/context/gzip_response_writer.go @@ -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 diff --git a/core/host/proxy_test.go b/core/host/proxy_test.go index 42d8fbf3..d5e39dce 100644 --- a/core/host/proxy_test.go +++ b/core/host/proxy_test.go @@ -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) diff --git a/core/memstore/memstore.go b/core/memstore/memstore.go index 674981b9..0e61c04c 100644 --- a/core/memstore/memstore.go +++ b/core/memstore/memstore.go @@ -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. //