@@ -2,5 +2,5 @@
|
||||
|
||||
{
|
||||
echo "mcr.microsoft.com/mssql/server:2017-CU12"
|
||||
echo "ibmcom/db2:11.5.0.0a"
|
||||
} > spring-data-jdbc/src/test/resources/container-license-acceptance.txt
|
||||
echo "ibmcom/db2:11.5.7.0a"
|
||||
} > spring-data-jdbc/src/test/resources/container-license-acceptance.txt
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.testcontainers.containers.Db2Container;
|
||||
@Profile("db2")
|
||||
class Db2DataSourceConfiguration extends DataSourceConfiguration {
|
||||
|
||||
public static final String DOCKER_IMAGE_NAME = "ibmcom/db2:11.5.7.0a";
|
||||
private static final Log LOG = LogFactory.getLog(Db2DataSourceConfiguration.class);
|
||||
|
||||
private static Db2Container DB_2_CONTAINER;
|
||||
@@ -47,7 +48,7 @@ class Db2DataSourceConfiguration extends DataSourceConfiguration {
|
||||
if (DB_2_CONTAINER == null) {
|
||||
|
||||
LOG.info("DB2 starting...");
|
||||
Db2Container container = new Db2Container().withReuse(true);
|
||||
Db2Container container = new Db2Container(DOCKER_IMAGE_NAME).withReuse(true);
|
||||
container.start();
|
||||
LOG.info("DB2 started");
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class LicenseListener implements TestExecutionListener {
|
||||
environment = new StandardEnvironment();
|
||||
|
||||
if (environment.acceptsProfiles(Profiles.of("db2"))) {
|
||||
assumeLicenseAccepted(Db2Container.DEFAULT_DB2_IMAGE_NAME + ":" + Db2Container.DEFAULT_TAG);
|
||||
assumeLicenseAccepted(Db2DataSourceConfiguration.DOCKER_IMAGE_NAME);
|
||||
}
|
||||
|
||||
if (environment.acceptsProfiles(Profiles.of("mssql"))) {
|
||||
|
||||
Reference in New Issue
Block a user