gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

test.sh (636B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 # "-count 1" = run all tests once, ignoring cache; useful for when we're running tests with different database back to back like this
      6 # "-p 1" = run with parallel value of 1 -- in other words, one test at a time
      7 # "./..." = all tests
      8 
      9 # run tests with sqlite in-memory database
     10 GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -tags "netgo osusergo static_build kvformat" -count 1 ./...
     11 
     12 # run tests with postgres database at either GTS_DB_ADDRESS or default localhost
     13 GTS_DB_TYPE="postgres" GTS_DB_ADDRESS="${GTS_DB_ADDRESS:-localhost}" go test -tags "netgo osusergo static_build kvformat" -count 1 -p 1 ./...