[BACK-GOV-02] Automatic Seeding of the Test Case Demographic Matrix in the Database

Backend: Data

Published

October 14, 2026

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

  1. Table Schema Design: Develop an SQL script to create the structural layout of the demographic registry (the demographic_records table) containing the following fields: email, profile_status, and secure_payload.
  2. Implementing the Seeding Mechanism (Data Filling): Introduce an SQL migration or a bootstrapping startup script within the Go application that executes a forced INSERT statement 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 a GOV_ACCOUNT_BLOCKED error response).
    • Missing from Registry: The profile for twin.3@example.com must not be inserted into the database (in order to generate a USER_NOT_FOUND error condition).
  3. 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.