Files
ssw-mvp/docs/e2e/cases/TC-REL-012.mjs
T
admin 3247e9fd15 init: ssw-mvp initial commit
- boot/ (Java/Maven, JNPF 7.0) — 移除旧的 boot/.git,源码直接纳入仓库
- web/ (Vue 3 + Vite + Ant Design Vue, pnpm)
- docs/, scard/, nax/
- refs/INDEX.md + refs/国标/(其余 refs/* 开源子仓库不纳入)
- 已忽略: connector_data/, jweb/, log/, web/{dist,node_modules,.pnpm}, boot/*/target/, .DS_Store, .idea, .vscode
2026-08-05 18:29:12 +08:00

33 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* TC-REL-012 · 掉电后数据可恢复
* REQ-Q-REL 质量特性-可靠性 正向 P0
*
* 前置:1. 系统已部署并正常运行 2. 网络及测试环境可用
* 步骤:1. 系统运行中突然掉电 2. 重新启动并加载数据
* 预期:1. 数据可恢复且无损坏、无丢失
*
* 「突然掉电 + 重启」属于破坏性操作,CI 中无法执行。
*/
export const meta = {
tc: 'TC-REL-012',
req: 'Q-REL',
title: '掉电后数据可恢复',
type: '正向',
priority: 'P0',
route: '',
needs: []
}
export async function run(t) {
t.manual(`人工核对指引(真实掉电测试只能在受控测试环境由运维执行):
1. 部署环境准备:数据库开启 WAL/redo-log(PostgreSQL/MySQL 默认开启),确认备份策略已开启;
2. 在系统运行期间新建一笔可识别业务(如合约 code=REL12-${Date.now()}),记录其 ID;
3. 执行模拟掉电:
a) 容器:docker kill --signal=KILL <ssw-tds-pid>;
b) 物理机:拔电源或长按电源键;
4. 重启系统,待服务完全就绪后:
- 通过接口验证该笔业务记录仍存在;
- 数据库无残缺行(主外键完整);
- 文件存储无孤儿对象;
5. 出具掉电恢复报告(按 docs/tdd/P1P2_CHAIN_K8S_REPORT.md 模板)。`)
}