Documentation:
By default, the test suite runs SQL Server in a container using TestContainers.
The container database binds to an arbitrary port to avoid conflicts. Nevertheless, you can force the usage of the standard SQL Server port (1433) with a flag:
mvn test -DcontainerFixedPort
You can start external database instances:
cd docker
docker compose up
Then run tests against it:
mvn test \
-Dconnection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1433 \
-Dtls.connection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1435 \
-Dforce.encryption.connection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1437
-
tls.connection.uri
: connection uri of the database to use forMSSQLEncryptionTest
-
force.encryption.connection.uri
: connection uri of the database to use forMSSQLForcedEncryptionTest
-
connection.uri
: connection uri of the database to use for all other tests