Refactor the TestcontainersCassandraConfiguration class and make the Apache Cassandra constants dynamic, pulling from System properties.

This commit is contained in:
John Blum
2023-05-12 15:53:14 -07:00
parent 02f5acb032
commit b564c391c0

View File

@@ -67,8 +67,8 @@ import example.app.crm.model.Customer;
public class TestcontainersCassandraConfiguration extends TestCassandraConfiguration {
// Apache Cassandra Constants
private static final String CASSANDRA_VERSION = "3.11.15";
private static final String LOCAL_DATACENTER_NAME = "datacenter1";
private static final String CASSANDRA_VERSION = System.getProperty("cassandra.version", "3.11.15");
private static final String LOCAL_DATACENTER_NAME = System.getProperty("cassandra.datacenter.name", "datacenter1");
// Testcontainers Constants
private static final String TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX = "harbor-repo.vmware.com/dockerhub-proxy-cache/";