From 8a64e4ba1ef71f8e26d114ca1d389bc44fb63607 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Fri, 15 Dec 2017 20:13:09 +0100 Subject: [PATCH] Setup make test-coverage --- .travis.yml | 4 ++-- Makefile | 6 ++++++ gluster/integration/integration_test.go | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bdef156..a4788db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,8 @@ script: # - sudo cat /var/log/glusterfs/* - ./docker-volume-gluster -after_success: - - bash <(curl -s https://codecov.io/bash) -f coverage.* +#after_success: +# - make test-coverage before_deploy: - make compress diff --git a/Makefile b/Makefile index d7c5852..a58f3ce 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,12 @@ test-integration: dev-deps deps format @echo -e "$(OK_COLOR)==> Running integration tests...$(NO_COLOR)" go test -v -timeout 1h -race -coverprofile=coverage.inte.out -covermode=atomic -coverpkg ./gluster/driver ./gluster/integration +test-coverage: test + @echo -e "$(OK_COLOR)==> Uploading coverage ...$(NO_COLOR)" + curl -s https://codecov.io/bash | bash -s - -F unittests -f coverage.unit.out + curl -s https://codecov.io/bash | bash -s - -F integration -f coverage.inte.out +#Need CODECOV_TOKEN=:uuid + docs: @echo -e "$(OK_COLOR)==> Serving docs at http://localhost:$(DOC_PORT).$(NO_COLOR)" @godoc -http=:$(DOC_PORT) diff --git a/gluster/integration/integration_test.go b/gluster/integration/integration_test.go index 14eb883..9212253 100644 --- a/gluster/integration/integration_test.go +++ b/gluster/integration/integration_test.go @@ -207,6 +207,6 @@ func TestIntegration(t *testing.T) { if outDistributedContainer != out { t.Errorf("Content inside gluster distributed volume in not the same : %s != %s", outDistributedContainer, out) } - //TODO check that container is same as before + //TODO check persistence }