Change test containers to use nordix docker registry 33/142333/1 master
authordanielhanrahan <daniel.hanrahan@est.tech>
Fri, 31 Oct 2025 14:31:21 +0000 (14:31 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Fri, 31 Oct 2025 14:31:21 +0000 (14:31 +0000)
Tests are sometimes failing while trying to pull images
from dockerhub, due to rate limiting. Switching to nordix
mirror may fix it.

Issue-ID: POLICY-5472
Change-Id: I6df2a2481778f1061967b43c33c77ca341867094
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/liquibase/HibernateValidationTest.java
runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/liquibase/LiquibaseRollbackTest.java

index 28d138d..1a498f5 100644 (file)
@@ -29,6 +29,7 @@ import org.springframework.test.context.DynamicPropertySource;
 import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.junit.jupiter.Container;
 import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.utility.DockerImageName;
 
 /**
  * This test enables Hibernate validation during context startup.
@@ -45,7 +46,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
 class HibernateValidationTest {
 
     @Container
-    static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:16");
+    private static final PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
+            DockerImageName.parse("registry.nordix.org/onaptest/postgres:14.1").asCompatibleSubstituteFor("postgres"));
 
     @DynamicPropertySource
     static void overrideProperties(DynamicPropertyRegistry registry) {
index 0ecce32..1919c25 100644 (file)
@@ -44,6 +44,7 @@ import org.junit.jupiter.params.provider.MethodSource;
 import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.junit.jupiter.Container;
 import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.utility.DockerImageName;
 
 // This test class verifies that rollbacks for each Liquibase release tag works correctly.
 @Testcontainers
@@ -51,7 +52,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
 class LiquibaseRollbackTest {
 
     @Container
-    private static final PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:16");
+    private static final PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
+            DockerImageName.parse("registry.nordix.org/onaptest/postgres:14.1").asCompatibleSubstituteFor("postgres"));
 
     private Liquibase liquibase;