Skip to content

Commit

Permalink
Update default prop values for notif services
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed Oct 21, 2024
1 parent dbf6d2b commit d31b588
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d31b588

Please sign in to comment.