docs: split inbox test plans into case files
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Case: `init-creates-schema-on-empty-db`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证在空数据库路径上执行 `init` 会创建可用的 inbox schema,并返回稳定的初始化响应。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- 选择一个尚不存在的数据库路径 `TMPDIR/coord.db`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
inbox --db TMPDIR/coord.db --json init
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- 命令退出码为 `0`
|
||||
- 返回 `ok=true`
|
||||
- `command` 为 `init`
|
||||
- `data.db_path` 等于传入路径
|
||||
- `data.status` 为 `initialized`
|
||||
|
||||
## 断言结论
|
||||
|
||||
- `init` 在空路径上可以直接完成 schema 初始化
|
||||
- 初始化结果足以让后续 `send`、`fetch` 等命令继续使用同一数据库
|
||||
Reference in New Issue
Block a user