How ezv-eets/eets-test-container works
Project Type and Purpose
• This is a container-based testing environment (“EETS-Test-Container (CH)”) for the Swiss FCA’s EETS system.
• It provides a ready-to-use Docker Compose setup that spins up:
• An NGINX reverse-proxy (mTLS termination)
• One or more FCA-supplied EETS service containers (pulled from ghcr.io)
• A Test-Support Service (REST API for managing test cases)
• A PostgreSQL database backing the services
• It also bundles certificate assets, ASN.1 message definitions, example ADUs, and integration-test scripts.
File Structure Analysis
• Top-level orchestration:
• docker-compose.yml – defines all service containers, networks, volumes, published ports.
• nginx.conf – reverse-proxy configuration for ports 80/443.
• provider.properties – user-supplied config for provider identity and mTLS CN.
• cert/ – volume of TLS and signing certificates (client CA, fullchain.pem, privkey.pem, provider signing certs, FCA signing cert).
• asn/ – ASN.1 definitions for EFC messages (static assets mounted into containers).
• docs/ – OpenAPI spec for the Test-Support Service and example ADU XMLs.
• .github/workflows/docker-compose-startup.yml – CI that spins up the Docker Compose stack.
• .integration-test/docker-compose.test.yml + run-tc-integration-test.sh – separate compose setup for automated end-to-end tests.
• Host Environment: Docker Engine & Docker-Compose
• Container: NGINX Reverse Proxy
• Container: EETS Interface Service(s) (mTLS + message signature)
• Container: Test-Support Service (REST API, port 8096)
• Container: PostgreSQL Database (port 5432)
• Configuration Volume: cert/, provider.properties, asn/ definitions
• External Registry: ghcr.io (source of FCA service images)
• Client/System Under Test (the provider’s system connecting via mTLS)
• Integration-Test Runner (optional, separate compose)
1. Provider System →(mTLS over 443)→ NGINX →(proxy→) EETS Interface Service
2. Test-Support Client/Tool ↔(HTTP REST over 8096)↔ Test-Support Service
3. Both EETS Service & Test-Support Service →(JDBC)→ PostgreSQL
4. Docker-Compose pulls images from ghcr.io; mounts cert/, provider.properties, asn/, docs into the containers
5. Integration-Test Runner triggers Test-Support API and/or direct calls to EETS Interface
c. Architectural Patterns & Principles
• Containerized micro‐services with clear separation of concerns
• Reverse-proxy for TLS termination and routing (NGINX)
• Externalized configuration via volumes (certificates, properties)
• Persistent data store in a dedicated DB container
• CI/CD integration via GitHub Actions and separate integration-test composition
d. Key Technologies & Libraries
• Docker & Docker-Compose
• NGINX
• PostgreSQL
• mTLS for authentication
• ASN.1 message definitions (ISO12855, ISO14906, etc.)
• OpenAPI (docs/openapi.yml) for the Test-Support Service
• Shell scripts for orchestration (clean-start-container.sh, run-tc-integration-test.sh)