Fix skipped mongo and minio tests (#791)

This commit is contained in:
Tomasz Tomalak
2018-10-18 23:36:28 +02:00
committed by Aaron Schlesinger
parent 639bd23bb0
commit f665b0c2eb
3 changed files with 10 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ env:
global: global:
- PATH=${PATH}:./bin - PATH=${PATH}:./bin
- GO_ENV=test - GO_ENV=test
- ATHENS_MONGO_STORAGE_URL=mongodb://127.0.0.1:27017
- ATHENS_MINIO_ENDPOINT=127.0.0.1:9001 - ATHENS_MINIO_ENDPOINT=127.0.0.1:9001
- MINIO_ACCESS_KEY=minio - MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123 - MINIO_SECRET_KEY=minio123
+1 -1
View File
@@ -26,7 +26,7 @@ func BenchmarkBackend(b *testing.B) {
} }
func getStorage(tb testing.TB) *ModuleStore { func getStorage(tb testing.TB) *ModuleStore {
url := os.Getenv("ATHENS_MONGO_URL") url := os.Getenv("ATHENS_MONGO_STORAGE_URL")
if url == "" { if url == "" {
tb.SkipNow() tb.SkipNow()
} }
+8
View File
@@ -6,6 +6,14 @@ if [ -z ${GO_ENV} ]; then
export GO_ENV="test" export GO_ENV="test"
fi 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 export GO111MODULE=on
# Run the unit tests with the race detector and code coverage enabled # Run the unit tests with the race detector and code coverage enabled