mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
feat(elevator): 对齐 V1 lib 的 Davinci/扫描/事件与部署配置
- davinci-manager-storage:FilePart 路径与基址按 V1 JAR(/portal/file、/part/*、GET /download) - 启动类:扫描 cn.cloudwalk.serial 与 cn.cloudwalk.cwos.client.resource,补 UUIDSerial 与 ApplicationService - deploy:v1/v2 application 中 cloudwalk.serial.enabled、Kafka 指向 192.168.3.12:9092;deploy/.gitignore 忽略日志 - cloudwalk-common-serial:补充 META-INF/spring.factories(Boot 自动配置) - 电梯:Session 配置、Davinci Bean、Feign 包、MQTT/Visitor/Zone Feign;部署脚本与 API parity 工具更新 - 文档与根脚本若干;未纳入大体积 jar/zip 与 v1 CFR 对比目录 Made-with: Cursor Former-commit-id: b76d142d13ebb5c0898de2d9d11bc583876829c2
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
# 完整接口测试:V1/V2 单机冒烟 + 双端对拍 + 套件总览 Markdown。
|
||||
# 前置:两 JAR 已分别启动(默认 http://127.0.0.1:18080 为 V1、18081 为 V2),且配置同一数据源/Redis。
|
||||
# 用法:在 maven-cw-elevator-application 目录执行 ./scripts/run_full_elevator_api_suite.sh
|
||||
set -euo pipefail
|
||||
|
||||
REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
TOOL="${REPO}/tools/elevator_api_parity"
|
||||
MARKER="${TOOL}/.suite_run_marker"
|
||||
|
||||
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
export PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
export ELEVATOR_BASE_OLD="${ELEVATOR_BASE_OLD:-http://127.0.0.1:18080}"
|
||||
export ELEVATOR_BASE_NEW="${ELEVATOR_BASE_NEW:-http://127.0.0.1:18081}"
|
||||
|
||||
cd "$TOOL"
|
||||
python3 -m pip install -q -r requirements.txt 2>/dev/null || true
|
||||
|
||||
touch "$MARKER"
|
||||
|
||||
# -rs 在结束时打印 skip 原因;s=skip 通常表示目标端口无服务或 /actuator/health 无 200
|
||||
PTF="-q -rs --tb=line"
|
||||
|
||||
echo "==> 单元(compare 逻辑)"
|
||||
python3 -m pytest tests/test_unit_compare.py -q --tb=short
|
||||
|
||||
echo "==> 冒烟 V1 ($ELEVATOR_BASE_OLD) [需该地址可访问 /actuator/health 等健康端点]"
|
||||
python3 -m pytest tests/test_smoke_catalog.py -m smoke \
|
||||
--smoke-base="$ELEVATOR_BASE_OLD" --smoke-label=v1_legacy $PTF || true
|
||||
|
||||
echo "==> 冒烟 V2 ($ELEVATOR_BASE_NEW) [需该地址可访问 /actuator/health 等健康端点]"
|
||||
python3 -m pytest tests/test_smoke_catalog.py -m smoke \
|
||||
--smoke-base="$ELEVATOR_BASE_NEW" --smoke-label=v2_build $PTF || true
|
||||
|
||||
echo "==> 横向对拍(两实例均需通过健康探针)"
|
||||
python3 -m pytest tests/test_parity_endpoints.py -m live $PTF \
|
||||
--base-old="$ELEVATOR_BASE_OLD" --base-new="$ELEVATOR_BASE_NEW" || true
|
||||
|
||||
SUITE_TS="$(date +%Y%m%d-%H%M%S)"
|
||||
_pick_newer() {
|
||||
local pattern="$1"
|
||||
local f=""
|
||||
for f in $(ls -t "${TOOL}/report"/${pattern} 2>/dev/null); do
|
||||
if [[ -f "$f" && "$f" -nt "$MARKER" ]]; then echo "$f"; return; fi
|
||||
done
|
||||
}
|
||||
SMOKE_V1="$(_pick_newer 'smoke-v1_legacy-*.md')"
|
||||
SMOKE_V2="$(_pick_newer 'smoke-v2_build-*.md')"
|
||||
PARITY="$(_pick_newer 'parity-*.md')"
|
||||
|
||||
OUT="${TOOL}/report/SUITE-${SUITE_TS}.md"
|
||||
python3 report/generate_suite_summary.py --out "$OUT" \
|
||||
--catalog "${TOOL}/api_catalog.json" \
|
||||
${PARITY:+--parity "$PARITY"} \
|
||||
${SMOKE_V1:+--smoke-v1 "$SMOKE_V1"} \
|
||||
${SMOKE_V2:+--smoke-v2 "$SMOKE_V2"}
|
||||
|
||||
echo "==> 套件总览: $OUT"
|
||||
if [[ -z "$SMOKE_V1" && -z "$SMOKE_V2" && -z "$PARITY" ]]; then
|
||||
echo "==> 提示: 未生成 smoke/parity 子报告(多为本机未起 JAR 或健康检查未通过)。"
|
||||
echo " 先起两进程: java -jar V1.jar --server.port=18080 --spring.config.location=... 与 V2 用 18081"
|
||||
echo " 快速探活: curl -s -o /dev/null -w '%{http_code}' $ELEVATOR_BASE_OLD/actuator/health"
|
||||
fi
|
||||
rm -f "$MARKER"
|
||||
Reference in New Issue
Block a user