Documentation:
By default, the test suite runs Oracle database 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 Oracle port (1521) with a flag:
mvn test -DcontainerFixedPort
-
stop Docker engine
-
install Colima
> colima start --arch x86_64 --memory 4
> docker context use colima
> export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=${HOME}/.colima/docker.sock
> export DOCKER_HOST="unix:///${HOME}/.colima/docker.sock"
> export TESTCONTAINERS_RYUK_DISABLED=true
You can start an external database:
docker run -t -i -p 1521:1521 -e ORACLE_PASSWORD=vertx gvenzl/oracle-free:23-slim-faststart
Then run tests against it:
mvn test -Dconnection.uri="oracle:thin:sys as sysdba/vertx@localhost:1521/FREEPDB1"
-
connection.uri
: configure the client to connect to the specified database