diff --git a/pass-notification-service/src/main/resources/application.properties b/pass-notification-service/src/main/resources/application.properties index 54240d1e..68d1cfd5 100644 --- a/pass-notification-service/src/main/resources/application.properties +++ b/pass-notification-service/src/main/resources/application.properties @@ -21,8 +21,8 @@ spring.jms.listener.auto-startup=true spring.jms.cache.enabled=false spring.mail.protocol=${SPRING_MAIL_PROTOCOL:smtp} -spring.mail.host=${SPRING_MAIL_HOST:localhost} -spring.mail.port=${SPRING_MAIL_PORT:587} +spring.mail.host=${SPRING_MAIL_HOST} +spring.mail.port=${SPRING_MAIL_PORT} spring.mail.username=${SPRING_MAIL_USERNAME} spring.mail.password=${SPRING_MAIL_PASSWORD} spring.mail.properties.mail.smtp.starttls.enable=true @@ -32,14 +32,14 @@ spring.mail.properties.mail.smtp.connectiontimeout=5000 spring.mail.properties.mail.smtp.timeout=3000 spring.mail.properties.mail.smtp.writetimeout=5000 -pass.client.url=${PASS_CORE_URL:localhost:8080} -pass.client.user=${PASS_CORE_USER:fakeuser} -pass.client.password=${PASS_CORE_PASSWORD:fakepassword} +pass.client.url=${PASS_CORE_URL} +pass.client.user=${PASS_CORE_USER} +pass.client.password=${PASS_CORE_PASSWORD} pass.jms.queue.submission.event.name=${PASS_JMS_QUEUE_SUBMISSION_EVENT_NAME:event} pass.notification.mode=${PASS_NOTIFICATION_MODE:DEMO} pass.notification.configuration=${PASS_NOTIFICATION_CONFIGURATION:classpath:/notification.json} pass.link.scheme=${PASS_LINK_SCHEME:https} -pass.link.host=${PASS_LINK_HOST:passreplacethis.foo} -pass.app.domain=${PASS_APP_DOMAIN:passreplacethis.foo} +pass.link.host=${PASS_LINK_HOST} +pass.app.domain=${PASS_APP_DOMAIN} diff --git a/pass-notification-service/src/test/java/org/eclipse/pass/notification/config/AwsParamStoreConfigTest.java b/pass-notification-service/src/test/java/org/eclipse/pass/notification/config/AwsParamStoreConfigTest.java index 0fd757d6..c25439b1 100644 --- a/pass-notification-service/src/test/java/org/eclipse/pass/notification/config/AwsParamStoreConfigTest.java +++ b/pass-notification-service/src/test/java/org/eclipse/pass/notification/config/AwsParamStoreConfigTest.java @@ -39,7 +39,15 @@ "spring.cloud.aws.credentials.access-key=noop", "spring.cloud.aws.credentials.secret-key=noop", "spring.cloud.aws.region.static=us-east-1", - "spring.jms.listener.auto-startup=false" + "spring.jms.listener.auto-startup=false", + "spring.mail.host=${SPRING_MAIL_HOST:test-mail-host}", + "spring.mail.port=${SPRING_MAIL_PORT:999}", + "spring.mail.username=${SPRING_MAIL_USERNAME:test-mail-user}", + "spring.mail.password=${SPRING_MAIL_PASSWORD:test-mail-pw}", + "pass.client.url=http://localhost:8080/", + "pass.client.user=${PASS_CORE_USER:test}", + "pass.client.password=${PASS_CORE_PASSWORD:test-pw}", + "pass.app.domain=testing-pass-app-domain", }) @ContextConfiguration(initializers = ConfigDataApplicationContextInitializer.class) @Testcontainers @@ -77,7 +85,7 @@ static void beforeAll() throws IOException, InterruptedException { @Test public void testLoadPropFromParamStore() { String mailHostNameProp = environment.getProperty("spring.mail.host"); - assertEquals("localhost", mailHostNameProp); + assertEquals("test-mail-host", mailHostNameProp); String userPwProp = environment.getProperty("spring.mail.password"); assertEquals("aws-param-store-notif-pw", userPwProp); String passClientPwProp = environment.getProperty("pass.client.password"); diff --git a/pass-notification-service/src/test/resources/test-application.properties b/pass-notification-service/src/test/resources/test-application.properties index c6b4f2f7..8c8e6d9e 100644 --- a/pass-notification-service/src/test/resources/test-application.properties +++ b/pass-notification-service/src/test/resources/test-application.properties @@ -19,6 +19,10 @@ # spring.jms.listener.auto-startup=false +pass.client.url=http://localhost:8080/ +pass.client.user=backend +pass.client.password=backend + spring.mail.protocol=smtp spring.mail.host=localhost spring.mail.port=3025