- 新增 crypto.go: AES-256-GCM 加解密,与 Python backend 兼容 - auth.go: Login 添加 LDAP fallback(本地优先→LDAP绑定→自动创建本地用户) - ldap.go: 实现真实 LDAP 连接/用户搜索/密码验证/OU列表/用户列表 - 所有 LDAP 操作解密 admin_password 后使用 - 新增/更新密码存储时加密 - router.go: 补充 delete-user 路由 - 添加 go-ldap/v3 依赖
21 lines
541 B
Bash
Executable File
21 lines
541 B
Bash
Executable File
#!/bin/bash
|
|
# SQL-Platform 测试运行脚本
|
|
# 用法: bash run_tests.sh [test_file_or_pattern]
|
|
# 示例: bash run_tests.sh test_auth.py
|
|
# bash run_tests.sh test_ticket
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
BACKEND_PY="$SCRIPT_DIR/backend-python"
|
|
TEST_DIR="$SCRIPT_DIR/tests"
|
|
PYTHON="$BACKEND_PY/venv/bin/python"
|
|
|
|
export PYTHONPATH="$BACKEND_PY"
|
|
|
|
if [ -n "$1" ]; then
|
|
"$PYTHON" -m pytest "$TEST_DIR/$1" -v --tb=short --no-header "$@" 2>&1
|
|
else
|
|
"$PYTHON" -m pytest "$TEST_DIR/" -v --tb=short --no-header 2>&1
|
|
fi
|