forked from niuniu/llm-intelligence
33 lines
1.2 KiB
Bash
33 lines
1.2 KiB
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||
|
|
. "$SCRIPT_DIR/verify_common.sh"
|
||
|
|
|
||
|
|
echo "=== Phase 2 验收检查 ==="
|
||
|
|
|
||
|
|
check_shell "ProviderMapper 单元测试通过" "go test ./internal/collectors/..."
|
||
|
|
check_shell "重试组件单元测试通过" "go test ./internal/retry/..."
|
||
|
|
check_shell "OpenRouter 采集器可独立构建" "go build -o /dev/null ./scripts/fetch_openrouter.go"
|
||
|
|
check_sql_int_ge "国内厂商种子数不少于 7 家" \
|
||
|
|
"select count(*) from model_provider where country='CN';" \
|
||
|
|
7
|
||
|
|
check_sql_int_ge "国内厂商模型数不少于 10 条" \
|
||
|
|
"select count(*) from models m join model_provider p on m.provider_id = p.id where p.country='CN';" \
|
||
|
|
10
|
||
|
|
check_sql_int_ge "CNY 定价记录不少于 10 条" \
|
||
|
|
"select count(*) from region_pricing where currency='CNY';" \
|
||
|
|
10
|
||
|
|
check_sql_int_ge "采集成功统计记录至少 1 条" \
|
||
|
|
"select count(*) from collector_stats where success = true;" \
|
||
|
|
1
|
||
|
|
check_sql_int_ge "models 总量达到 371+" \
|
||
|
|
"select count(*) from models where deleted_at is null;" \
|
||
|
|
371
|
||
|
|
check_sql_int_ge "models 审计日志达到 371+" \
|
||
|
|
"select count(*) from audit_log where table_name='models';" \
|
||
|
|
371
|
||
|
|
|
||
|
|
finish_phase
|