2020-07-10 14:16:42 -04:00
|
|
|
#!/bin/sh
|
2020-12-11 09:56:20 -05:00
|
|
|
set -e
|
|
|
|
|
2021-02-04 11:34:58 -05:00
|
|
|
psql -U lemmy -d postgres -c "DROP DATABASE lemmy;"
|
|
|
|
psql -U lemmy -d postgres -c "CREATE DATABASE lemmy;"
|
|
|
|
|
2020-07-10 14:16:42 -04:00
|
|
|
export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
|
2021-04-05 13:21:56 -04:00
|
|
|
# tests are executed in working directory crates/api (or similar),
|
|
|
|
# so to load the config we need to traverse to the repo root
|
|
|
|
export LEMMY_CONFIG_LOCATION=../../config/config.hjson
|
2021-03-02 07:57:06 -05:00
|
|
|
RUST_BACKTRACE=1 \
|
2021-03-01 12:46:56 -05:00
|
|
|
cargo test --workspace --no-fail-fast
|