2020-07-10 18:16:42 +00:00
|
|
|
#!/bin/sh
|
2020-12-11 14:56:20 +00: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 18:16:42 +00: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 12:57:06 +00:00
|
|
|
RUST_BACKTRACE=1 \
|
2022-08-23 21:20:00 +00:00
|
|
|
cargo test -p lemmy_db_views --no-fail-fast --all-features -- --nocapture
|
2022-07-30 03:55:59 +00:00
|
|
|
# Add this to do printlns: -- --nocapture
|