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 \
|
2022-11-18 20:30:59 -05:00
|
|
|
cargo test --workspace --all-features --no-fail-fast
|
2022-07-29 23:55:59 -04:00
|
|
|
# Add this to do printlns: -- --nocapture
|