From 658cd392278e89efa8e7244ae08ce20a07e894d2 Mon Sep 17 00:00:00 2001 From: Mark Patton Date: Wed, 3 Apr 2024 13:59:13 -0400 Subject: [PATCH] Modify pass-core test container to use basic auth in wait strategy. This is needed for new version of pass-core. --- .../org/eclipse/pass/deposit/AbstractDepositSubmissionIT.java | 2 +- .../org/eclipse/pass/support/grant/AbstractIntegrationTest.java | 2 +- .../org/eclipse/pass/loader/nihms/NihmsSubmissionEtlITBase.java | 2 +- .../pass/notification/service/NotificationServiceIT.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/AbstractDepositSubmissionIT.java b/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/AbstractDepositSubmissionIT.java index c6b12e221..b2671e06f 100644 --- a/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/AbstractDepositSubmissionIT.java +++ b/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/AbstractDepositSubmissionIT.java @@ -95,7 +95,7 @@ public abstract class AbstractDepositSubmissionIT { .withEnv("PASS_CORE_BASE_URL", "http://localhost:8080") .withEnv("PASS_CORE_BACKEND_USER", "backend") .withEnv("PASS_CORE_BACKEND_PASSWORD", "backend") - .waitingFor(Wait.forHttp("/data/grant").forStatusCode(401)) + .waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend")) .withExposedPorts(8080); @Autowired protected SubmissionTestUtil submissionTestUtil; diff --git a/pass-grant-loader/src/test/java/org/eclipse/pass/support/grant/AbstractIntegrationTest.java b/pass-grant-loader/src/test/java/org/eclipse/pass/support/grant/AbstractIntegrationTest.java index 3861fdb3b..a3e0b01b7 100644 --- a/pass-grant-loader/src/test/java/org/eclipse/pass/support/grant/AbstractIntegrationTest.java +++ b/pass-grant-loader/src/test/java/org/eclipse/pass/support/grant/AbstractIntegrationTest.java @@ -62,7 +62,7 @@ public abstract class AbstractIntegrationTest { .withEnv("PASS_CORE_BASE_URL", "http://localhost:8080") .withEnv("PASS_CORE_BACKEND_USER", "backend") .withEnv("PASS_CORE_BACKEND_PASSWORD", "backend") - .waitingFor(Wait.forHttp("/data/grant").forStatusCode(401)) + .waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend")) .withExposedPorts(8080); @SpyBean protected PassClient passClient; diff --git a/pass-nihms-loader/nihms-data-transform-load/src/test/java/org/eclipse/pass/loader/nihms/NihmsSubmissionEtlITBase.java b/pass-nihms-loader/nihms-data-transform-load/src/test/java/org/eclipse/pass/loader/nihms/NihmsSubmissionEtlITBase.java index 5be4220d7..850e28f4a 100644 --- a/pass-nihms-loader/nihms-data-transform-load/src/test/java/org/eclipse/pass/loader/nihms/NihmsSubmissionEtlITBase.java +++ b/pass-nihms-loader/nihms-data-transform-load/src/test/java/org/eclipse/pass/loader/nihms/NihmsSubmissionEtlITBase.java @@ -91,7 +91,7 @@ public abstract class NihmsSubmissionEtlITBase { .withEnv("PASS_CORE_BASE_URL", "http://localhost:8080") .withEnv("PASS_CORE_BACKEND_USER", "backend") .withEnv("PASS_CORE_BACKEND_PASSWORD", "backend") - .waitingFor(Wait.forHttp("/data/grant").forStatusCode(401)) + .waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend")) .withExposedPorts(8080); @DynamicPropertySource diff --git a/pass-notification-service/src/test/java/org/eclipse/pass/notification/service/NotificationServiceIT.java b/pass-notification-service/src/test/java/org/eclipse/pass/notification/service/NotificationServiceIT.java index f6097641a..8e82054b3 100644 --- a/pass-notification-service/src/test/java/org/eclipse/pass/notification/service/NotificationServiceIT.java +++ b/pass-notification-service/src/test/java/org/eclipse/pass/notification/service/NotificationServiceIT.java @@ -91,7 +91,7 @@ public class NotificationServiceIT extends AbstractNotificationSpringIntegration .withEnv("PASS_CORE_BASE_URL", "http://localhost:8080") .withEnv("PASS_CORE_BACKEND_USER", "backend") .withEnv("PASS_CORE_BACKEND_PASSWORD", "backend") - .waitingFor(Wait.forHttp("/data/grant").forStatusCode(401)) + .waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend")) .withExposedPorts(8080); @RegisterExtension