Core — Ledger Test Cases
Derived from FSD Use Cases (v0 — expand when Doc05 Excel exists)
A. Document controlA. Kiểm soát tài liệu
B. Version historyB. Lịch sử phiên bản
| Version |
Date |
Author |
ChangesThay đổi |
| 1.0 |
01/12/2026 |
Khoa Trinh |
Version 1.0 |
C. Table of contentsC. Mục lục
D. ContentD. Nội dung
Index
Test cases
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-DEP-01 |
| Test name |
Deposit TX finalized (Synchronizer); VA exists |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
POST deposit_detected with reference=tx_hash |
| Expected result |
VA balance += amount; one log NEW_TRANSACTION |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-SWP-01 |
| Test name |
VA has balance |
| Preconditions |
ops / sync |
| Data |
— |
| Steps |
sweep_initiate then on-chain sweep then sweep_complete |
| Expected result |
Funds on hot wallet account |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-PAY-01 |
| Test name |
Hot/invoice funded |
| Preconditions |
transaction-service |
| Data |
— |
| Steps |
payment_allocate then confirm_funds |
| Expected result |
Merchant available += net; fees accrued |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-RSK-01 |
| Test name |
Merchant available ≥ amount |
| Preconditions |
risk/ops |
| Data |
— |
| Steps |
risk_hold |
| Expected result |
Funds in risk_hold |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-STL-01 |
| Test name |
Available/locked funds |
| Preconditions |
settlement client |
| Data |
— |
| Steps |
lock → batch_init → batch_complete |
| Expected result |
Settled + fee accounts updated |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-REF-01 |
| Test name |
Available ≥ refund |
| Preconditions |
transaction/ops |
| Data |
— |
| Steps |
refund_lock → refund_execute |
| Expected result |
Beneficiary credited; fee if any |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-IDM-01 |
| Test name |
Prior successful deposit for tx_hash |
| Preconditions |
sync-service |
| Data |
— |
| Steps |
Replay identical create |
| Expected result |
Same transaction id; no second credit |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-OVR-01 |
| Test name |
Account balance B |
| Preconditions |
any writer |
| Data |
— |
| Steps |
Debit B+1 via template |
| Expected result |
Request fails; balances unchanged |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-REV-01 |
| Test name |
Existing transaction |
| Preconditions |
authorized ops |
| Data |
— |
| Steps |
Revert by id |
| Expected result |
Reversing tx; volumes restored |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-ADR-01 |
| Test name |
New customer/VA |
| Preconditions |
account-service |
| Data |
— |
| Steps |
Allocate next sequential index; derive address; UNIQUE insert; bind metadata to treasury:virtual:{chain}:{va} |
| Expected result |
Address unique; no collision |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-KYT-01 |
| Test name |
Merchant funds pending; KYT decision exists |
| Preconditions |
transaction/risk service |
| Data |
— |
| Steps |
Call confirm with PASS reference |
| Expected result |
Funds become available with decision metadata |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-FRZ-01 |
| Test name |
Mismatch or incident detected |
| Preconditions |
reconciliation/security |
| Data |
— |
| Steps |
Create scoped freeze; attempt affected template |
| Expected result |
Write rejected until approved clear |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-HSH-01 |
| Test name |
Hash mode configured |
| Preconditions |
platform/security |
| Data |
— |
| Steps |
Recompute integrity; generate/verify checkpoint if required |
| Expected result |
Volumes/logs/checkpoint agree |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-DR-01 |
| Test name |
Recoverable backup/PIT exists |
| Preconditions |
platform ops |
| Data |
— |
| Steps |
Restore; replay queues; verify invariants and checkpoints |
| Expected result |
Service reopens within RTO and declared RPO |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-CLS-01 |
| Test name |
Period closed |
| Preconditions |
finance/ops |
| Data |
— |
| Steps |
Attempt ordinary backdated write, then approved retrospective adjustment |
| Expected result |
Ordinary write blocked; adjustment append-only and linked |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
LED-001
| Field |
Value |
| Test ID |
LED-001 |
| Business Requirement ID |
— |
| Category |
Function |
| Use Case ID |
UC-PRF-01 |
| Test name |
Prod-equivalent environment |
| Preconditions |
load-test engineering |
| Data |
— |
| Steps |
Run TC-03/08 in both hash modes and overload |
| Expected result |
Capacity/topology decision supported by evidence |
| Notes |
Derived from FSD Use Cases — expand steps/expected when Doc05 Excel is available. |
E. ReferencesE. Tham chiếu