Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.31 KB

File metadata and controls

38 lines (23 loc) · 1.31 KB

Local Testing of Persistence Providers

ServiceControl supports multiple persistence types

  • RavenDB (default)
  • Microsoft SQL Server
  • PostgreSQL

All persistence test projects can be run with dotnet test against the corresponding test project in src/.

RavenDB

RavenDB persistence tests start an embedded RavenDB instance for the duration of the test run.

SQL Server

SQL Server persistence tests use Testcontainers and expect the local image particular/servicecontrol-testing-sqlserver:latest.

Build that image locally before running SQL Server persistence tests:

docker buildx build --platform=linux/amd64 --tag particular/servicecontrol-testing-sqlserver:latest ./src/Scripts/Docker/servicecontrol-testing-sqlserver

If you want to use an existing SQL Server instance instead of a test container, set the ServiceControl_Persistence_SqlServer_ConnectionString environment variable to a valid SQL Server connection string.

PostgreSQL

PostgreSQL persistence tests use Testcontainers and start a postgres:16-alpine container automatically.

If you want to use an existing PostgreSQL instance instead of a test container, set:

ServiceControl_Persistence_PostgreSql_ConnectionString

to a valid PostgreSQL connection string.