[BACK-GOV-02] Automatic Seeding of the Test Case Demographic Matrix in the Database
Backend: Data
NoteTask Brief
- Repository / Component:
gov_identity_soap_mock. - Stack: Go, PostgreSQL 15 (SQL Migrations).
- Task Type: Backend (Database / Testing).
- Status: Ready for Implementation
Task Description
To conduct end-to-end (E2E) and integration testing on the gateway side, the government service simulator database must automatically deploy a fixed matrix of test scenarios during its initial startup (boot phase).
Step-by-Step Instructions
- Table Schema Design: Develop an SQL script to create the structural layout of the demographic registry (the
demographic_recordstable) containing the following fields:email,profile_status, andsecure_payload. - Implementing the Seeding Mechanism (Data Filling): Introduce an SQL migration or a bootstrapping startup script within the Go application that executes a forced
INSERTstatement for the following specific test cases whenever the database is empty:- Successful Employee:
twin.1@example.com(Status:ACTIVE). - Violation/Suspension:
twin.2@example.com(Must trigger aGOV_ACCOUNT_BLOCKEDerror response). - Missing from Registry: The profile for
twin.3@example.commust not be inserted into the database (in order to generate aUSER_NOT_FOUNDerror condition).
- Successful Employee:
- Scenario Testing (Postman Verification): Write an integration test suite or prepare a Postman collection containing an XML payload embedded within the
<fetch_secure_employee_data>tag to validate each of the three SOAP server response states.