2020-07-10 14:16:42 -04:00
|
|
|
#!/bin/sh
|
2020-12-11 15:56:20 +01:00
|
|
|
set -e
|
|
|
|
|
2021-02-04 16:34:58 +00: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 17:21:56 +00: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 13:57:06 +01:00
|
|
|
RUST_BACKTRACE=1 \
|
2022-08-24 13:44:50 +02:00
|
|
|
cargo test --workspace --no-fail-fast
|
2022-07-29 23:55:59 -04:00
|
|
|
# Add this to do printlns: -- --nocapture
|