2a85164e49
Switch the dockerized MySQL container to mysql_native_password (single challenge-response) instead of the default caching_sha2_password (extra RSA key exchange round-trip on non-TLS connections). Also disable binary logging since tests don't need replication. Both reduce per-connection overhead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
@backstage/backend-test-utils
Test helpers library for Backstage backends.
Usage
Add the library as a devDependency to your backend package:
# From your Backstage root directory, go to your backend package, or to a backend plugin
cd plugins/my-plugin-backend
yarn add --dev @backstage/backend-test-utils
Environment variables
BACKSTAGE_TEST_DISABLE_DOCKER- Setting the value to
1disables Docker for tests
- Setting the value to
CI- Setting the value to
1enables long-running tests, including the ones utilizing Docker
- Setting the value to
BACKSTAGE_TEST_DOCKER_REGISTRY- Docker registry mirror address where to pull images for tests, for example
mycompany.docker.io/mirror - See documentation for information
about authentication (
DOCKER_AUTH_CONFIG)
- Docker registry mirror address where to pull images for tests, for example
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_STRINGBACKSTAGE_TEST_DATABASE_POSTGRES12_CONNECTION_STRINGBACKSTAGE_TEST_DATABASE_POSTGRES11_CONNECTION_STRINGBACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRINGBACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING