From 9c8ee93b5c74a626d68cc46dee9d2adda0238a19 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Mon, 22 Dec 2014 20:05:11 -0600 Subject: [PATCH] Update TravisCI to goclean script. Also, correct a couple of issues found by running the script. --- .travis.yml | 22 ++++++++++------------ example_test.go | 1 + ldb/operational_test.go | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index aadc7570..6f025bf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,15 @@ language: go -go: - - 1.2 - - release - - tip +go: release +before_install: + - gocleandeps=c16c849abae90c23419d + - git clone https://gist.github.com/$gocleandeps.git + - goclean=71d0380287747d956a26 + - git clone https://gist.github.com/$goclean.git install: - go get -d -t -v ./... - - go get -v code.google.com/p/go.tools/cmd/vet - - go get -v github.com/GeertJohan/fgt - - go get -v github.com/golang/lint/golint + - bash $gocleandeps/gocleandeps.sh script: - export PATH=$PATH:$HOME/gopath/bin - - go vet ./... - - fgt golint . - - fgt golint memdb - - fgt golint ldb - - go test -v + - bash $goclean/goclean.sh +after_success: + - goveralls -coverprofile=profile.cov -service=travis-ci \ No newline at end of file diff --git a/example_test.go b/example_test.go index 80622e4b..8ca49c54 100644 --- a/example_test.go +++ b/example_test.go @@ -6,6 +6,7 @@ package btcdb_test import ( "fmt" + "github.com/conformal/btcdb" _ "github.com/conformal/btcdb/memdb" "github.com/conformal/btcnet" diff --git a/ldb/operational_test.go b/ldb/operational_test.go index a31564dc..6d4a4e93 100644 --- a/ldb/operational_test.go +++ b/ldb/operational_test.go @@ -199,7 +199,7 @@ func testBackout(t *testing.T) { return } if _, err := db.ExistsSha(sha); err != nil { - t.Errorf("ExistsSha: unexpected error: %v") + t.Errorf("ExistsSha: unexpected error: %v", err) } _, err = db.FetchBlockBySha(sha) if err != nil { @@ -213,7 +213,7 @@ func testBackout(t *testing.T) { return } if _, err := db.ExistsSha(sha); err != nil { - t.Errorf("ExistsSha: unexpected error: %v") + t.Errorf("ExistsSha: unexpected error: %v", err) } _, err = db.FetchBlockBySha(sha) if err != nil {