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

Doc IDCPG-TC-CPG-Core_Ledger_TestCases
VersionPhiên bản1.0
StatusTrạng tháiDraft
OwnerCPG BA / Architecture
AudienceĐối tượngQA, Product, Backend, Frontend
ClassificationPhân loạiInternal
Effective dateNgày hiệu lực01/12/2026
Related docs Core Ledger UC · CPG-Core_FSD_Ledger

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 ID Test name BR UC Category
LED-001 Deposit TX finalized (Synchronizer); VA exists — UC-DEP-01 Function
LED-001 VA has balance — UC-SWP-01 Function
LED-001 Hot/invoice funded — UC-PAY-01 Function
LED-001 Merchant available ≥ amount — UC-RSK-01 Function
LED-001 Available/locked funds — UC-STL-01 Function
LED-001 Available ≥ refund — UC-REF-01 Function
LED-001 Prior successful deposit for tx_hash — UC-IDM-01 Function
LED-001 Account balance B — UC-OVR-01 Function
LED-001 Existing transaction — UC-REV-01 Function
LED-001 New customer/VA — UC-ADR-01 Function
LED-001 Merchant funds pending; KYT decision exists — UC-KYT-01 Function
LED-001 Mismatch or incident detected — UC-FRZ-01 Function
LED-001 Hash mode configured — UC-HSH-01 Function
LED-001 Recoverable backup/PIT exists — UC-DR-01 Function
LED-001 Period closed — UC-CLS-01 Function
LED-001 Prod-equivalent environment — UC-PRF-01 Function

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