summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/utils/MessagingSpec.groovy2
-rwxr-xr-xcps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java5
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/notification/KafkaTestContainerConfig.groovy2
3 files changed, 5 insertions, 4 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/utils/MessagingSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/utils/MessagingSpec.groovy
index 097834afc5..712c2b8f14 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/utils/MessagingSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/utils/MessagingSpec.groovy
@@ -41,7 +41,7 @@ class MessagingSpec extends Specification {
kafkaTestContainer.start()
}
- static kafkaTestContainer = new KafkaContainer(DockerImageName.parse('confluentinc/cp-kafka:6.2.1'))
+ static kafkaTestContainer = new KafkaContainer(DockerImageName.parse('registry.nordix.org/onaptest/confluentinc/cp-kafka:6.2.1').asCompatibleSubstituteFor('confluentinc/cp-kafka'))
def producerConfigProperties() {
return [('bootstrap.servers'): kafkaTestContainer.getBootstrapServers().split(',')[0],
diff --git a/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java b/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java
index 2d2df2e629..61a5c042a6 100755
--- a/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java
+++ b/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java
@@ -21,6 +21,7 @@
package org.onap.cps;
import org.testcontainers.containers.PostgreSQLContainer;
+import org.testcontainers.utility.DockerImageName;
/**
* The Postgresql database test container wrapper.
@@ -30,11 +31,11 @@ import org.testcontainers.containers.PostgreSQLContainer;
* psql -d test -U test
*/
public class DatabaseTestContainer extends PostgreSQLContainer<DatabaseTestContainer> {
- private static final String IMAGE_VERSION = "postgres:14.1";
+ private static final String IMAGE_VERSION = "registry.nordix.org/onaptest/postgres:14.1";
private static DatabaseTestContainer databaseTestContainer;
private DatabaseTestContainer() {
- super(IMAGE_VERSION);
+ super(DockerImageName.parse(IMAGE_VERSION).asCompatibleSubstituteFor("postgres"));
}
/**
diff --git a/cps-service/src/test/groovy/org/onap/cps/notification/KafkaTestContainerConfig.groovy b/cps-service/src/test/groovy/org/onap/cps/notification/KafkaTestContainerConfig.groovy
index 05b9624a47..b07b31a35b 100644
--- a/cps-service/src/test/groovy/org/onap/cps/notification/KafkaTestContainerConfig.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/notification/KafkaTestContainerConfig.groovy
@@ -33,7 +33,7 @@ class KafkaTestContainerConfig {
// Not the best performance but it is good enough for test case
private static synchronized KafkaContainer getKafkaContainer() {
if (kafkaContainer == null) {
- kafkaContainer = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:6.2.1"))
+ kafkaContainer = new KafkaContainer(DockerImageName.parse("registry.nordix.org/onaptest/confluentinc/cp-kafka:6.2.1").asCompatibleSubstituteFor("confluentinc/cp-kafka"))
.withEnv("KAFKA_AUTO_CREATE_TOPICS_ENABLE", "false")
kafkaContainer.start()
Runtime.getRuntime().addShutdownHook(new Thread(kafkaContainer::stop))