Files
ssw-mvp/docs/e2e/cases/TC-REL-003.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.6 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-003 · 异常断电不破坏软件或数据
* REQ-Q-REL 质量特性-可靠性 正向 P0
*
* 前置:1. 已登录系统 2. 具有相应操作权限
* 步骤:1. 系统运行中模拟掉电/异常退出/网络异常中断 2. 重启后检查
* 预期:1. 软件或数据不因上述异常遭到破坏
*
* 浏览器自动化无法真正模拟掉电/进程强杀/拔网线 —— 属于破坏性操作,CI 中不可执行。
*/
export const meta = {
tc: 'TC-REL-003',
req: 'Q-REL',
title: '异常断电不破坏软件或数据',
type: '正向',
priority: 'P0',
route: '',
needs: []
}
export async function run(t) {
t.manual(`人工核对指引(浏览器自动化无法在 CI 中执行掉电/强杀进程):
1. 在测试环境登录系统并完成一笔正常业务(如新建一条策略模板或数据产品);
2. 在该笔业务「提交后立即」对后端进程执行破坏性操作(任选其一):
a) 拔服务器电源 / 容器外执行 sudo kill -9 <pid>;
b) k8s 环境执行 kubectl delete pod <pod> --grace-period=0 --force;
c) 中断网络:在 web 网关上游 iptables -A INPUT -p tcp --dport 30000 -j DROP;
3. 重启服务(docker compose up / k8s 自动重建)并人工核对:
- 数据库连接恢复、迁移脚本不报错;
- 上一步骤新建的数据在「提交前若有事务回滚则应消失、若已 commit 则仍存在」,无残缺行;
- 文件上传/链上存证等异步任务未产生孤儿记录;
4. 验收文档见 docs/VERIFICATION_*.md 中关于容灾/恢复的章节。`)
}