Skip to main content
  1. Data-holder-testings/
  2. Non-Production configuration/

AU Data Holder Testing

2 mins

This Wych Data Holder Tester (Tester) is the Wych probe for validating the state of a Data Holder solution, this has been designed to support Data Holder testing for ACCC CDR standards with each test verifying a rule as set out in the specifications.

graph BT; DH[Data Holder] --> REG[CDR Register] DR[Data Holder Tester] --> REG DR --> DH

Tester can share a Register and Register Auth instance but has a one-to-one relationship with a Data Holder. The Tester must co-exist with the register as it is responsible for configuring the register and validating the Data Holder to register communications. To accomplish this Tester must have access to the Register and the Registers datastore.

graph BT; DH1[Data Holder] --> REG[CDR Register Auth] DH2[Data Holder] --> REG DH3[Data Holder] --> REG DR1[Data Holder Tester] --> REG DR2[Data Holder Tester] --> REG DR3[Data Holder Tester] --> REG DR1 --> DH1 DR2 --> DH2 DR3 --> DH3

Requirements #

Tester requires a PostgreSQL 14+ relational database. Tester can utilise the same PostgreSQL service as the other non-production service but requires two separate schemas. The schema can be set in the search path to faciliate easy of connection.

The PostgreSQL jdbc syntax is:

jdbc:postgresql://[host]:[port]/[db-name]?currentSchema=[db-schema]

This can be organised as a database per app or a schema per database.

jdbc:postgresql://localhost:5432/testing?currentSchema=au-dataholder-tester
jdbc:postgresql://localhost:5432/au-dataholder-tester?currentSchema=public

Repository #

Tester can be pulled from the following repository. Check versions for the latest version.

docker pull wychaustralia.azurecr.io/au-dataholder-tester:[version]

Config #

For the Tester to start you will need to set the following properties. If you are setting these as environment variables then use the UPPERCASE and replace . (dot) with _ (underscore).

  • WYCH_DATASOURCE_JDBC_URL (wych.datasource.jdbc.url)
  • WYCH_DATASOURCE_USERNAME (wych.datasource.username)
  • WYCH_DATASOURCE_PASSWORD (wych.datasource.password)

Docker compose #

Here is a sample docker compose - this sets up the required DB and configures the Register service. The majority of the configuration relates to providing

version: "3.7"
name: au-register
services:
  db:
    image: postgres
    init: true
    environment:
      PGDATA: /var/lib/postgresql/data/pgdata
      POSTGRES_USER: a-database-user
      POSTGRES_PASSWORD: a-database-password
    volumes:
      - au-register-data-volume:/var/lib/postgresql/data/pgdata
    networks:
      au-register-db:
        aliases:
          - au-register-db
  
  au-dataholder-tester:
    image: wychaustralia.azurecr.io/au-dataholder-tester:[version]
    restart: on-failure
    networks:
      - wych-service
      - au-register-auth-db
    environment:
      WYCH_DATASOURCE_TESTER_JDBC_URL: jdbc:postgresql://db:5432/wych?currentSchema=tester
      WYCH_DATASOURCE_TESTER_USERNAME: a-database-user
      WYCH_DATASOURCE_TESTER_PASSWORD: a-database-password
      WYCH_DATASOURCE_RECIPIENT_JDBC_URL: jdbc:postgresql://db:5432/wych?currentSchema=recipient
      WYCH_DATASOURCE_RECIPIENT_USERNAME: a-database-user
      WYCH_DATASOURCE_RECIPIENT_PASSWORD: a-database-password
      WYCH_DATASOURCE_REGISTER_JDBC_URL: jdbc:postgresql://db:5432/wych?currentSchema=register
      WYCH_DATASOURCE_REGISTER_USERNAME: a-database-user
      WYCH_DATASOURCE_REGISTER_PASSWORD: a-database-password
      WYCH_REGISTER_AUTH_URL=
      WYCH_REGISTER_URL=
      WYCH_DATAHOLDER_RESOURCE_ENDPOINT=http://au-cdr-dataholder/dh/cdr-data
      WYCH_DATAHOLDER_INFOSEC_ENDPOINT=http://api/au/dataholder/auth/infosec

networks:
  wych-service:
    name: wych-service
  au-register-auth-db:
      
volumes:
  au-register-auth-data-volume:
      
volumes:
  au-register-data-volume:

Changelog #

changelog