Skip to content
Snippets Groups Projects
Commit 9a44bc44 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4870 add fromDisplayName in realm smtp config

parent 0c9136d3
Branches
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ interface KeycloakRealmMapper {
smtpServer.put("starttls", server.getStarttls().toString());
smtpServer.put("auth", server.getAuth().toString());
smtpServer.put("from", server.getFrom());
smtpServer.put("fromDisplayName", server.getFromDisplayName());
return smtpServer;
}
......
......@@ -65,8 +65,12 @@ static class KeycloakRealmSMTPServer {
private String port;
private Boolean starttls;
private Boolean auth;
private String from;
private String fromDisplayName;
}
}
......@@ -94,7 +94,7 @@ class KeycloakRealmMapperTest {
void shouldMapSmtpServer() {
var mapped = mapper.map(OzgCloudKeycloakRealmSpecTestFactory.create());
assertThat(mapped.getSmtpServer().size()).isEqualTo(7);
assertThat(mapped.getSmtpServer().size()).isEqualTo(8);
}
@Test
......@@ -108,6 +108,7 @@ class KeycloakRealmMapperTest {
assertThat(mappedSmtpServer.get("starttls")).isEqualTo("true");
assertThat(mappedSmtpServer.get("auth")).isEqualTo("true");
assertThat(mappedSmtpServer.get("from")).isEqualTo("test@test.de");
assertThat(mappedSmtpServer.get("fromDisplayName")).isEqualTo("displayed name");
}
}
......@@ -29,7 +29,8 @@ public class OzgCloudKeycloakRealmSpecTestFactory {
public final static String DISPLAY_NAME = "TestDisplayName";
public final static boolean KEEP_AFTER_DELETE = false;
public final static KeycloakRealmSMTPServer SMTP_SERVER = KeycloakRealmSMTPServer.builder().host("host").user("user").password("psw").port("432").starttls(true).auth(true).from("test@test.de").build();
public final static KeycloakRealmSMTPServer SMTP_SERVER = KeycloakRealmSMTPServer.builder().host("host").user("user").
password("psw").port("432").starttls(true).auth(true).from("test@test.de").fromDisplayName("displayed name").build();
public static OzgCloudKeycloakRealmSpec create() {
return createBuilder().build();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment