fix #79 with testcase
This commit is contained in:
parent
65966c0759
commit
dffa8330ea
@ -55,11 +55,15 @@ public class SSLCertDomainTest {
|
|||||||
Object execute = client.execute(MODULE + ".add", params);
|
Object execute = client.execute(MODULE + ".add", params);
|
||||||
assertTrue(execute instanceof Map<?, ?>);
|
assertTrue(execute instanceof Map<?, ?>);
|
||||||
Thread.sleep(5000L);
|
Thread.sleep(5000L);
|
||||||
CommandShell.execute("grep 'SSLCertificateChainFile' /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net");
|
String out = CommandShell.execute("( ls /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net >/dev/null 2>&1 " +
|
||||||
fail("ShellException expected");
|
" && grep 'SSLCertificateChainFile' /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net >/dev/null 2>&1 " +
|
||||||
|
" && echo Ok )" +
|
||||||
|
" || echo fail");
|
||||||
|
assertTrue(out.startsWith("Ok"));
|
||||||
} catch (XmlRpcException e) {
|
} catch (XmlRpcException e) {
|
||||||
fail(e.getMessage());
|
fail(e.getMessage());
|
||||||
} catch (ShellException e) {
|
} catch (ShellException e) {
|
||||||
|
fail(e.getMessage());
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail(e.getMessage());
|
fail(e.getMessage());
|
||||||
}
|
}
|
||||||
@ -82,11 +86,15 @@ public class SSLCertDomainTest {
|
|||||||
Object execute = client.execute(MODULE + ".add", params);
|
Object execute = client.execute(MODULE + ".add", params);
|
||||||
assertTrue(execute instanceof Map<?, ?>);
|
assertTrue(execute instanceof Map<?, ?>);
|
||||||
Thread.sleep(5000L);
|
Thread.sleep(5000L);
|
||||||
CommandShell.execute("grep 'SSLCertificate.*default' /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net");
|
String out = CommandShell.execute("( ls /var/local/lxc/hive/etc/apache2/sites-generated/aaa03.hostsharing.net >/dev/null 2>&1 " +
|
||||||
fail("ShellException expected");
|
" && grep 'SSLCertificate.*default' /var/local/lxc/hive/etc/apache2/sites-generated/aaa03.hostsharing.net >/dev/null 2>&1 " +
|
||||||
|
" && echo Ok )" +
|
||||||
|
" || echo fail");
|
||||||
|
assertTrue(out.startsWith("Ok"));
|
||||||
} catch (XmlRpcException e) {
|
} catch (XmlRpcException e) {
|
||||||
fail(e.getMessage());
|
fail(e.getMessage());
|
||||||
} catch (ShellException e) {
|
} catch (ShellException e) {
|
||||||
|
fail(e.getMessage());
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail(e.getMessage());
|
fail(e.getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user