Files
athens/scripts/test_unit.sh
Henry Jenkins d26b99d41c Upgrade Buffalo (#789)
* Upgrade buffalo

* Switch to go modules everywhere

* Fixes from buffalo fix

* Add missing modules from module list

* Update vendored modules in /vendor

* Stop using vendor directory for tests

* Check go.mod and go.sum files on verify

* Upgrade Buffalo from v0.13.0 to v0.13.1

* Fix test for new Buffalo

Allow for new Buffalo code

* Add test for endpoint with trailing slash
2018-10-23 16:49:32 -07:00

22 lines
479 B
Bash
Executable File

#!/bin/bash
# test_unit.sh
if [ -z ${GO_ENV} ]; then
export GO_ENV="test"
fi
if [ -z ${ATHENS_MINIO_ENDPOINT} ]; then
export ATHENS_MINIO_ENDPOINT="127.0.0.1:9001"
fi
if [ -z ${ATHENS_MONGO_STORAGE_URL} ]; then
export ATHENS_MONGO_STORAGE_URL="mongodb://127.0.0.1:27017"
fi
export GO111MODULE=on
# Run the unit tests with the race detector and code coverage enabled
set -xeuo pipefail
go test -mod=readonly -race -coverprofile cover.out -covermode atomic ./...