Skip to content

Commit

Permalink
Go - add query to CI integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bezzubov <[email protected]>
  • Loading branch information
bzz committed Mar 6, 2018
1 parent 557f8c1 commit 5a78be4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ matrix:
- ./hash src/test/resources/siva || travis_terminate 1
- ./query ./LICENSE
- ./report
- go get src/main/go/...
- go run src/main/go/query.go ./LICENSE
before_deploy:
- VERSION=$TRAVIS_TAG ./scripts/release.sh
deploy:
Expand Down
6 changes: 5 additions & 1 deletion src/main/go/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ func main() {

var similarHashes []BlobHash
if err := gocqlx.Select(&similarHashes, q.Query); err != nil {
log.Fatal("select:", err)
log.Fatalf("select: %v in %s", err, q.Query)
}

for _, hash := range similarHashes {
fmt.Printf("\t%+v\n", hash)
}

if len(similarHashes) == 0 {
os.Exit(2)
}
}

// connect to the cluster
Expand Down

0 comments on commit 5a78be4

Please sign in to comment.