Interface for connecting to externally managed services via configuration
The RemoteService interface allows tests to connect to services that are hosted externally rather than deployed by the test framework. Configuration is provided through system properties.
Remote services are enabled by setting a host property in the test configuration. When detected, the framework skips deployment and uses the provided connection details instead.
Returns the deployment priority for this service type.
@Overridedefault int priority() { return 2;}
Priority determines the order in which services are deployed. Remote services have priority 2, which is higher than container deployments (0) and OpenShift deployments (1).
Enable the remote service by setting system properties:
# Run tests with remote PostgreSQLmvn test \ -Dtnb.postgresql.host=db.example.com \ -Dtnb.postgresql.port=5432 \ -Dtnb.postgresql.username=testuser \ -Dtnb.postgresql.password=testpass