feat: allow specifying custom Docker registry for tests

this allows to utilize private Docker registries for the tests that are
pulling images for the database tests.

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2023-05-09 07:18:05 +03:00
parent 39ba2284d7
commit 63af7f6d53
6 changed files with 57 additions and 5 deletions
+20
View File
@@ -12,6 +12,26 @@ cd plugins/my-plugin-backend
yarn add --dev @backstage/backend-test-utils
```
## Environment variables
- `BACKSTAGE_TEST_DISABLE_DOCKER`
- Setting the value to `1` disables Docker for tests
- `CI`
- Setting the value to `1` enables long-running tests, including the ones utilizing Docker
- `BACKSTAGE_TEST_DOCKER_REGISTRY`
- Docker registry mirror address where to pull images for tests, for example `mycompany.docker.io/mirror`
- See [documentation](https://node.testcontainers.org/configuration/) for information
about authentication (`DOCKER_AUTH_CONFIG`)
Connection strings for different databases that are used for testing. The value of the
string should point to the running instance of the database.
- `BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING`
- `BACKSTAGE_TEST_DATABASE_POSTGRES12_CONNECTION_STRING`
- `BACKSTAGE_TEST_DATABASE_POSTGRES11_CONNECTION_STRING`
- `BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING`
- `BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING`
## Documentation
- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md)