Skip to content
Snippets Groups Projects
Commit 0c9136d3 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4870 add auth and from for smtpserver config

parent 08c8933c
Branches
Tags
No related merge requests found
......@@ -60,6 +60,8 @@ interface KeycloakRealmMapper {
smtpServer.put("user", server.getUser());
smtpServer.put("password", server.getPassword());
smtpServer.put("starttls", server.getStarttls().toString());
smtpServer.put("auth", server.getAuth().toString());
smtpServer.put("from", server.getFrom());
return smtpServer;
}
......
......@@ -65,6 +65,8 @@ static class KeycloakRealmSMTPServer {
private String port;
private Boolean starttls;
private Boolean auth;
private String from;
}
}
......@@ -94,7 +94,7 @@ class KeycloakRealmMapperTest {
void shouldMapSmtpServer() {
var mapped = mapper.map(OzgCloudKeycloakRealmSpecTestFactory.create());
assertThat(mapped.getSmtpServer().size()).isEqualTo(5);
assertThat(mapped.getSmtpServer().size()).isEqualTo(7);
}
@Test
......@@ -106,6 +106,8 @@ class KeycloakRealmMapperTest {
assertThat(mappedSmtpServer.get("password")).isEqualTo("psw");
assertThat(mappedSmtpServer.get("user")).isEqualTo("user");
assertThat(mappedSmtpServer.get("starttls")).isEqualTo("true");
assertThat(mappedSmtpServer.get("auth")).isEqualTo("true");
assertThat(mappedSmtpServer.get("from")).isEqualTo("test@test.de");
}
}
......@@ -29,7 +29,7 @@ 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).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").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