Browse Source

Fix unit tests

main
Dustin Frisch 10 months ago
parent
commit
77cf77aafb
No known key found for this signature in database GPG Key ID: B4C3BF012D9B26BE
  1. 2
      src/main/java/de/hsfulda/informatik/LdapSync.java
  2. 1
      src/test/java/de/hsfulda/informatik/LdapSyncTest.java

2
src/main/java/de/hsfulda/informatik/LdapSync.java

@ -126,7 +126,7 @@ public class LdapSync {
if (properties.getProperty("sync.dst.shell") != null) { if (properties.getProperty("sync.dst.shell") != null) {
e.addAttribute(new Attribute("loginShell", properties.getProperty("sync.dst.shell"))); e.addAttribute(new Attribute("loginShell", properties.getProperty("sync.dst.shell")));
} }
e.addAttribute(new Attribute("homeDirectory", String.format(properties.getProperty("sync.dst.home"), cn)));
e.addAttribute(new Attribute("homeDirectory", String.format(properties.getProperty("sync.dst.home", "/home/%s"), cn)));
if (properties.getProperty("sync.dst.sasl-password", "false").equals("true")) { if (properties.getProperty("sync.dst.sasl-password", "false").equals("true")) {
e.addAttribute(new Attribute("userPassword", "{SASL}" + cn)); e.addAttribute(new Attribute("userPassword", "{SASL}" + cn));
} }

1
src/test/java/de/hsfulda/informatik/LdapSyncTest.java

@ -75,7 +75,6 @@ public class LdapSyncTest {
assertTrue(attributes.contains("uidNumber")); assertTrue(attributes.contains("uidNumber"));
assertTrue(attributes.contains("gidNumber")); assertTrue(attributes.contains("gidNumber"));
assertTrue(attributes.contains("homeDirectory")); assertTrue(attributes.contains("homeDirectory"));
assertTrue(attributes.contains("loginShell"));
assertEquals(entry.getAttributeValue("cn").toLowerCase(), entry.getAttributeValue("cn")); assertEquals(entry.getAttributeValue("cn").toLowerCase(), entry.getAttributeValue("cn"));
assertEquals(entry.getAttributeValue("uid").toLowerCase(), entry.getAttributeValue("uid")); assertEquals(entry.getAttributeValue("uid").toLowerCase(), entry.getAttributeValue("uid"));

Loading…
Cancel
Save