@Test public void startCommandFailre() { terminal.expectCommand("systemctl show docker 2>&1", 1, "error"); SystemCtl.SystemCtlStart startDockerService = new SystemCtl(terminal).start("docker"); try { startDockerService.converge(taskContext); fail(); } catch (ChildProcessFailureException e) { } }
public SystemCtlStart start(String unit) { return new SystemCtlStart(unit); }
SystemCtl { public SystemCtlStart start(String unit) { return new SystemCtlStart(unit); } }
SystemCtl { public SystemCtlStart start(String unit) { return new SystemCtlStart(unit); } SystemCtl(Terminal terminal); }
SystemCtl { public SystemCtlStart start(String unit) { return new SystemCtlStart(unit); } SystemCtl(Terminal terminal); SystemCtl withSudo(); boolean useSudo(); void daemonReload(TaskContext taskContext); SystemCtlEnable enable(String unit); SystemCtlDisable disable(String unit); SystemCtlStart start(String unit); SystemCtlStop stop(String unit); SystemCtlRestart restart(String unit); boolean serviceExists(TaskContext context, String unit); boolean isActive(TaskContext context, String unit); }
SystemCtl { public SystemCtlStart start(String unit) { return new SystemCtlStart(unit); } SystemCtl(Terminal terminal); SystemCtl withSudo(); boolean useSudo(); void daemonReload(TaskContext taskContext); SystemCtlEnable enable(String unit); SystemCtlDisable disable(String unit); SystemCtlStart start(String unit); SystemCtlStop stop(String unit); SystemCtlRestart restart(String unit); boolean serviceExists(TaskContext context, String unit); boolean isActive(TaskContext context, String unit);  }