44c320d8fa
Track required workspace crates, scripts, and historical diesel migrations so the repository contains the complete runnable backend baseline. Made-with: Cursor
20 lines
978 B
Bash
Executable File
20 lines
978 B
Bash
Executable File
#!/usr/bin/env bash
|
||
# 在已启动 Postgres(htyts 库)、Redis、以及 AuthCore `htyuc`(与 JWT_KEY 一致)的前提下,运行联调测试。
|
||
# `HTYUC_URL` 指向 `htyuc` 根地址(如 http://127.0.0.1:18080)。`TS_DATABASE_URL` 必填。
|
||
# 本地从零起容器 + 迁移 + htyuc + 本测试:./scripts/run-authcore-e2e-docker.sh(`docker-compose.authcore-e2e.yml`)。
|
||
set -euo pipefail
|
||
cd "$(dirname "$0")/.."
|
||
|
||
export HTYUC_URL="${HTYUC_URL:-http://127.0.0.1:18080}"
|
||
export JWT_KEY="${JWT_KEY:-test_jwt_key_for_testing_only_1234567890}"
|
||
export TOKEN_VERIFY="${TOKEN_VERIFY:-true}"
|
||
export AUTH_CHECKING="${AUTH_CHECKING:-true}"
|
||
export REDIS_HOST="${REDIS_HOST:-127.0.0.1}"
|
||
export REDIS_PORT="${REDIS_PORT:-6379}"
|
||
export TS_DOMAIN="${TS_DOMAIN:-e2e.test.local}"
|
||
export POOL_SIZE="${POOL_SIZE:-8}"
|
||
|
||
: "${TS_DATABASE_URL:?set TS_DATABASE_URL to htyts Postgres URL}"
|
||
|
||
exec cargo test -p htyts --test ts_e2e_authcore_http -- --ignored --test-threads=1 --nocapture
|