Skip to content

Commit

Permalink
Fix skipped mongo and minio tests (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tomalak authored and arschles committed Oct 18, 2018
1 parent 639bd23 commit f665b0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
global:
- PATH=${PATH}:./bin
- GO_ENV=test
- ATHENS_MONGO_STORAGE_URL=mongodb://127.0.0.1:27017
- ATHENS_MINIO_ENDPOINT=127.0.0.1:9001
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/mongo/mongo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func BenchmarkBackend(b *testing.B) {
}

func getStorage(tb testing.TB) *ModuleStore {
url := os.Getenv("ATHENS_MONGO_URL")
url := os.Getenv("ATHENS_MONGO_STORAGE_URL")
if url == "" {
tb.SkipNow()
}
Expand Down
8 changes: 8 additions & 0 deletions scripts/test_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ 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
Expand Down

0 comments on commit f665b0c

Please sign in to comment.