Files
gotenberg/build/tests/docker-entrypoint.sh
Julien Neuhart 8f721cd12a fixing tests
2019-09-30 16:38:52 +02:00

20 lines
387 B
Bash
Executable File

#!/bin/bash
set -xe
# Make sure the user running the
# tests is the Gotenberg user.
CURRENT_USER=$(whoami)
if [ "$CURRENT_USER" != "gotenberg" ]; then
exit 1
fi
# Start Google Chrome headless.
go run test/cmd/chrome.go
# Run our tests.
if [ "$CODE_COVERAGE" = "1" ]; then
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
else
go test -race -cover ./...
fi