From 735ca88d87651a6b48337d21d2e259ab1a710498 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 14 Jun 2022 11:58:33 +0100 Subject: [PATCH 1/2] Document the env prefix option introduced by #382 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3d067e6f..f876e075 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,9 @@ If you're looking to run against a custom Dockerfile, it must meet the following - The homeserver needs to assume dockerfile `CMD` or `ENTRYPOINT` instructions will be run multiple times. - The homeserver needs to use `complement` as the registration shared secret for `/_synapse/admin/v1/register`, if supported. If this endpoint 404s then these tests are skipped. +If the image needs environment variables to function, you can: +1. define a pass-through prefix with e.g. `COMPLEMENT_SHARE_ENV_PREFIX=PASS_`; then +2. prefix the desired environment variables with that prefix; e.g. `PASS_SYNAPSE_COMPLEMENT_USE_WORKERS=true`. ### Developing locally From d252ebfcf117e20d6bac0b83c31970ba67b0a467 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 16 Jun 2022 11:09:44 +0100 Subject: [PATCH 2/2] Move doc to 'Running' section --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f876e075..d4d4bee5 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ options will work, so to just run 1 named test and include a timeout for the tes $ COMPLEMENT_BASE_IMAGE=complement-dendrite:latest go test -timeout 30s -run '^(TestOutboundFederationSend)$' -v ./tests/... ``` +If you need to pass environment variables to the image under test, you can: +1. define a pass-through prefix with e.g. `COMPLEMENT_SHARE_ENV_PREFIX=PASS_`; then +2. prefix the desired environment variables with that prefix; e.g. `PASS_SYNAPSE_COMPLEMENT_USE_WORKERS=true`. + + ### Potential conflict with firewall software The homeserver in the test image needs to be able to make requests to the mock @@ -98,9 +103,6 @@ If you're looking to run against a custom Dockerfile, it must meet the following - The homeserver needs to assume dockerfile `CMD` or `ENTRYPOINT` instructions will be run multiple times. - The homeserver needs to use `complement` as the registration shared secret for `/_synapse/admin/v1/register`, if supported. If this endpoint 404s then these tests are skipped. -If the image needs environment variables to function, you can: -1. define a pass-through prefix with e.g. `COMPLEMENT_SHARE_ENV_PREFIX=PASS_`; then -2. prefix the desired environment variables with that prefix; e.g. `PASS_SYNAPSE_COMPLEMENT_USE_WORKERS=true`. ### Developing locally