HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2013-06-19 f2d2ca204597e1c2cd518c37b701a7a0ca9b28fb
test case error #130
2 files modified
23 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java 3 ●●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/DomainTest.java 20 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java
@@ -138,6 +138,9 @@
                    }
                }
            }
            // 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());
hsarback/test/de/hsadmin/remote/DomainTest.java
@@ -116,6 +116,26 @@
    }
    @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();
        String user = "aaa00";