rove/script/test.sh

21 lines
458 B
Bash
Raw Normal View History

2020-05-31 11:40:07 +01:00
#!/bin/bash
set -e
cd "$(dirname "$0")"
cd ..
set -x
# Build and start rove-server
docker-compose up --detach --build
# Run tests, including integration tests
go mod download
2020-05-31 11:55:46 +01:00
go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out
# Take down the service
2020-05-31 11:55:46 +01:00
docker-compose down
# Check that the cmdline client builds
docker build -f "cmd/rove/Dockerfile" .
2020-05-31 11:55:46 +01:00
# Convert the coverage data to html
go tool cover -html=/tmp/c.out -o /tmp/coverage.html