2020-07-10 12:16:42 -06:00
|
|
|
#!/bin/sh
|
2020-12-11 07:56:20 -07:00
|
|
|
set -e
|
|
|
|
|
2021-02-04 09:34:58 -07:00
|
|
|
psql -U lemmy -d postgres -c "DROP DATABASE lemmy;"
|
|
|
|
psql -U lemmy -d postgres -c "CREATE DATABASE lemmy;"
|
|
|
|
|
2020-07-10 12:16:42 -06:00
|
|
|
export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
|
2021-04-05 11:21:56 -06: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 05:57:06 -07:00
|
|
|
RUST_BACKTRACE=1 \
|
2021-03-01 10:46:56 -07:00
|
|
|
cargo test --workspace --no-fail-fast
|