Add a test compose file without a persistent volume
This commit is contained in:
parent
cade908ed2
commit
3dbdbd248e
2 changed files with 15 additions and 4 deletions
11
docker-compose-test.yml
Normal file
11
docker-compose-test.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
rove-server:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: cmd/rove-server/Dockerfile
|
||||||
|
image: rove-server:latest
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
command: ./rove-server --port 80
|
|
@ -4,8 +4,11 @@ cd "$(dirname "$0")"
|
||||||
cd ..
|
cd ..
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# Check that the cmdline client builds
|
||||||
|
docker build -f "cmd/rove/Dockerfile" .
|
||||||
|
|
||||||
# Build and start rove-server
|
# Build and start rove-server
|
||||||
docker-compose up --detach --build
|
docker-compose -f docker-compose-test.yml up --detach --build
|
||||||
|
|
||||||
# Run tests, including integration tests
|
# Run tests, including integration tests
|
||||||
go mod download
|
go mod download
|
||||||
|
@ -14,8 +17,5 @@ go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out
|
||||||
# Take down the service
|
# Take down the service
|
||||||
docker-compose down
|
docker-compose down
|
||||||
|
|
||||||
# Check that the cmdline client builds
|
|
||||||
docker build -f "cmd/rove/Dockerfile" .
|
|
||||||
|
|
||||||
# Convert the coverage data to html
|
# Convert the coverage data to html
|
||||||
go tool cover -html=/tmp/c.out -o /tmp/coverage.html
|
go tool cover -html=/tmp/c.out -o /tmp/coverage.html
|
Loading…
Add table
Add a link
Reference in a new issue