Skip to content

Use test double for azure keyvault in system tests #660

Description

@stefpiatek

Description

For our system tests, we currently connect to an azure keyvault, we want to replace it with a docker container running something that mimics the keyvault. This will help developer setup not requiring an azure keyvault, and should decrease costs of running tests.

lowkey-vault looks like a good option, has a prebuilt docker image and test containers

Haven't deeply investigated but it looks like the auth flow should work and we can configure it with secret name & secret values for keyvault names.

The .env.sample file in the test directory will need to be updated, adding in the URI for the key vault URI. The top level docker-compose file should have a azure_uri variable that defaults to vault.azure.net if not filled passed through to hasher-api and export-api, and that is used in _setup_client() in the core project config.

Dev setup requirements

  • .secrets.env values shared
  • Docker and uv installed on dev machine
  • test/run-system-test.sh can be run, powershell script version created, or manually run

Other options considered

Acceptance

  • system test docker-compose.yml creates a container for mocking out azure keyvault with the secrets for hashing and export added.
  • system test .secrets.env file is configured to connect to the mock keyvault and committed. The .secrets.env.sample file is removed
  • system tests pass with no access to a real azure keyvault
  • Remove all references to .secrets.env for setup instructions and in github actions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions