test case error #130

This commit is contained in:
Peter Hormanns 2013-06-19 16:32:57 +02:00
parent 86f2bb47a0
commit f2d2ca2045
2 changed files with 23 additions and 0 deletions

View File

@ -138,6 +138,9 @@ public class DomainModuleImpl extends AbstractModuleImpl {
}
}
}
// TODO war es ein break, dann weitermachen, sonst Exception !
}
Query adminQuery = em.createQuery("SELECT u FROM UnixUsers u WHERE u.name = :adminName");
adminQuery.setParameter("adminName", admin.getName());

View File

@ -115,6 +115,26 @@ public class DomainTest {
// testBackupMxForExternamlMxOnOff(false, "sollte bei neuer Domain ausgeschaltet sein");
}
@Test
public void testCreateForeignSubdomain() throws UnknownHostException, IOException {
int count = getDomsCount();
String user = "aaa01";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> setParams = new HashMap<String, String>();
setParams.put("name", "subdomain.f6n.de");
setParams.put("user", "aaa01");
Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
setParams };
try {
Object execute = client.execute(MODULE + ".add", params);
assertTrue(execute instanceof Map<?, ?>);
fail("should throw exception");
} catch (XmlRpcException e) {
assertEquals(count, getDomsCount());
}
}
@Test
public void testDelete() {
int count = getDomsCount();