HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-01-04 f5a476caf2e22879185f96773c06e2636442cfbf
fix #79 with testcase
1 files modified
27 ■■■■■ changed files
hsarback/test/de/hsadmin/remote/SSLCertDomainTest.java 27 ●●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/SSLCertDomainTest.java
@@ -65,4 +65,31 @@
        }
    }
    @Test
    public void testSSLCertWithChain() {
        String user = "ad";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> setParams = new HashMap<String, String>();
        setParams.put("name", "aaa03");
        setParams.put("hive", "h81");
        setParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa");
        setParams.put("basepac", "DW/B");
        setParams.put("curinetaddr", "176.9.242.76");
        Object[] params = new Object[] { user,
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
                setParams };
        try {
            Object execute = client.execute(MODULE + ".add", params);
            assertTrue(execute instanceof Map<?, ?>);
            Thread.sleep(5000L);
            CommandShell.execute("grep 'SSLCertificate.*default' /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net");
            fail("ShellException expected");
        } catch (XmlRpcException e) {
            fail(e.getMessage());
        } catch (ShellException e) {
        } catch (InterruptedException e) {
            fail(e.getMessage());
        }
    }
}