HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-05-05 733027b6bffd249d36d0b12bfa8592d94dbc281b
Test Hostmaster ad
3 files modified
39 ■■■■ changed files
hsarback/test/de/hsadmin/remote/CustomerTest.java 7 ●●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/InitDataTest.java 24 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/RemoteTest.java 8 ●●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/CustomerTest.java
@@ -64,10 +64,11 @@
        try {
            client.execute(MODULE + ".add", params);
            assertEquals(membersCount + 1, getMembersCount(user));
            for (int idx=11; idx < 99; idx++) {
            for (int idx=11; idx < 100; idx++) {
                setParams.put("membercode", "hsh00-n" + idx);
                setParams.put("memberno", "200" + idx);
                setParams.put("contact_street", "Hauptstr. " + idx);
                setParams.put("contact_street", "Hauptstr. " + idx);
                params[1] = cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL());
                client.execute(MODULE + ".add", params);
            }
        } catch (XmlRpcException e) {
@@ -86,7 +87,7 @@
        try {
            Object execute = client.execute(MODULE + ".search", params);
            Object[] result = (Object[]) execute;
            assertTrue(result.length > 98);
            assertTrue(result.length > 90);
        } catch (XmlRpcException e) {
            fail(e.getMessage());
        }
hsarback/test/de/hsadmin/remote/InitDataTest.java
@@ -35,12 +35,12 @@
    @Test
    public void testAddMember() {
        String user = "pe";
        String user = "ad";
        int membersCount = -9999;
        membersCount = getMembersCount();
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> setParams = new HashMap<String, String>();
        setParams.put("membercode", "hsh90-aaa");
        setParams.put("membercode", "hsh00-aaa");
        setParams.put("password", "geheimnIs");
        setParams.put("memberno", "20001");
        setParams.put("membersince", "01.10.2010");
@@ -72,14 +72,14 @@
    @Test
    public void testAddPac() {
        int count = getPacsCount();
        String user = "pe";
        String user = "ad";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> setParams = new HashMap<String, String>();
        setParams.put("name", "aaa00");
        setParams.put("hive", "h90");
        setParams.put("customer", "hsh90-aaa");
        setParams.put("hive", "h81");
        setParams.put("customer", "hsh00-aaa");
        setParams.put("basepac", "DW/B");
        setParams.put("curinetaddr", "83.223.95.132");
        setParams.put("curinetaddr", "192.168.108.201");
        Object[] params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
                setParams };
@@ -95,7 +95,7 @@
    @Test
    public void testDelPac() {
        int count = getPacsCount();
        String user = "pe";
        String user = "ad";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> whereParams = new HashMap<String, String>();
        whereParams.put("name", "aaa00");
@@ -113,10 +113,10 @@
    @Test
    public void testDelMember() {
        int count = getMembersCount();
        String user = "pe";
        String user = "ad";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> whereParams = new HashMap<String, String>();
        whereParams.put("membercode", "hsh90-aaa");
        whereParams.put("membercode", "hsh00-aaa");
        Object[] params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
                whereParams };
@@ -130,7 +130,7 @@
    private int getMembersCount() {
        int count = 0;
        String user = "pe";
        String user = "ad";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> whereParams = new HashMap<String, String>();
        Object[] params = new Object[] { user, 
@@ -149,10 +149,10 @@
    private int getPacsCount() {
        int count = 0;
        String user = "pe";
        String user = "ad";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> whereParams = new HashMap<String, String>();
        whereParams.put("customer", "hsh90-aaa");
        whereParams.put("customer", "hsh00-aaa");
        Object[] params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
                whereParams };
hsarback/test/de/hsadmin/remote/RemoteTest.java
@@ -5,11 +5,13 @@
@RunWith(Suite.class)
@Suite.SuiteClasses({
    InitDataTest.class,
    CustomerTest.class,
    UnixUserTest.class,
//    MySqlDatabaseTest.class,
//    MySqlUserTest.class,
//    PgSqlUserTest.class,
    MysqlDbTest.class,
    MysqlUserTest.class,
    PgsqlDbTest.class,
    PgsqlUserTest.class,
    EMailAliasTest.class,
    EMailAddressTest.class,
    DomainTest.class,