From bc39c357712bed7118106852b82541bbd7bfb5e0 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Mon, 23 Sep 2019 23:21:39 +0200 Subject: [PATCH] Expose OracleContainer image name property as public constant --- .../java/org/testcontainers/containers/OracleContainer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/oracle-xe/src/main/java/org/testcontainers/containers/OracleContainer.java b/modules/oracle-xe/src/main/java/org/testcontainers/containers/OracleContainer.java index ea0eee1a2ff..d8bcad4e06c 100644 --- a/modules/oracle-xe/src/main/java/org/testcontainers/containers/OracleContainer.java +++ b/modules/oracle-xe/src/main/java/org/testcontainers/containers/OracleContainer.java @@ -10,6 +10,7 @@ public class OracleContainer extends JdbcDatabaseContainer { public static final String NAME = "oracle"; + public static final String IMAGE_NAME_PROPERTY = "oracle.container.image"; private static final int ORACLE_PORT = 1521; private static final int APEX_HTTP_PORT = 8080; @@ -22,12 +23,12 @@ public class OracleContainer extends JdbcDatabaseContainer { private static String resolveImageName() { String image = TestcontainersConfiguration.getInstance() - .getProperties().getProperty("oracle.container.image"); + .getProperties().getProperty(IMAGE_NAME_PROPERTY); if (image == null) { throw new IllegalStateException("An image to use for Oracle containers must be configured. " + "To do this, please place a file on the classpath named `testcontainers.properties`, " + - "containing `oracle.container.image=IMAGE`, where IMAGE is a suitable image name and tag."); + "containing `" + IMAGE_NAME_PROPERTY + "=IMAGE`, where IMAGE is a suitable image name and tag."); } return image; }