| | |
| | | Object execute = client.execute(MODULE + ".add", params); |
| | | assertTrue(execute instanceof Map<?, ?>); |
| | | Thread.sleep(5000L); |
| | | CommandShell.execute("grep 'SSLCertificateChainFile' /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net"); |
| | | fail("ShellException expected"); |
| | | String out = CommandShell.execute("( ls /var/local/lxc/hive/etc/apache2/sites-generated/aaa02.hostsharing.net >/dev/null 2>&1 " + |
| | | " && 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) { |
| | | fail(e.getMessage()); |
| | | } catch (ShellException e) { |
| | | fail(e.getMessage()); |
| | | } catch (InterruptedException e) { |
| | | fail(e.getMessage()); |
| | | } |
| | |
| | | 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"); |
| | | String out = CommandShell.execute("( ls /var/local/lxc/hive/etc/apache2/sites-generated/aaa03.hostsharing.net >/dev/null 2>&1 " + |
| | | " && 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) { |
| | | fail(e.getMessage()); |
| | | } catch (ShellException e) { |
| | | fail(e.getMessage()); |
| | | } catch (InterruptedException e) { |
| | | fail(e.getMessage()); |
| | | } |