@Test(groups="Integration") public void testCopyTo() throws IOException { String fn = Urls.mergePaths(tempDir.getPath(), "f1"); SshPutTaskWrapper t = submit(SshTasks.newSshPutTaskFactory(host, fn).contents("hello world")); t.block(); Assert.assertEquals(FileUtils.readFileToString(new File(fn)), "hello world"); Assert.assertTrue(t.isDone()); Assert.assertTrue(t.isSuccessful()); Assert.assertEquals(t.get(), null); Assert.assertEquals(t.getExitCode(), (Integer)0); }
public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile) { return newSshPutTaskFactory(machine, true, remoteFile); }
SshTasks { public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile) { return newSshPutTaskFactory(machine, true, remoteFile); } }
SshTasks { public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile) { return newSshPutTaskFactory(machine, true, remoteFile); }  }
SshTasks { public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile) { return newSshPutTaskFactory(machine, true, remoteFile); }  static ProcessTaskFactory<Integer> newSshExecTaskFactory(SshMachineLocation machine, String ...commands); static ProcessTaskFactory<Integer> newSshExecTaskFactory(SshMachineLocation machine, final boolean useMachineConfig, String ...commands); static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile); static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, final boolean useMachineConfig, String remoteFile); static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, String remoteFile); static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, final boolean useMachineConfig, String remoteFile); static ProcessTaskFactory<Boolean> dontRequireTtyForSudo(SshMachineLocation machine, final boolean failIfCantSudo); static ProcessTaskFactory<Boolean> dontRequireTtyForSudo(SshMachineLocation machine, OnFailingTask onFailingTaskRequested); static Function<ProcessTaskWrapper<?>, String> returningStdoutLoggingInfo(final Logger logger, final boolean requireZero); static TaskFactory<?> installFromUrl(final SshMachineLocation location, final String url, final String destPath); static TaskFactory<?> installFromUrl(final Map<String, ?> props, final SshMachineLocation location, final String url, final String destPath); static TaskFactory<?> installFromUrl(final ResourceUtils utils, final Map<String, ?> props, final SshMachineLocation location, final String url, final String destPath); }
SshTasks { public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile) { return newSshPutTaskFactory(machine, true, remoteFile); }  static ProcessTaskFactory<Integer> newSshExecTaskFactory(SshMachineLocation machine, String ...commands); static ProcessTaskFactory<Integer> newSshExecTaskFactory(SshMachineLocation machine, final boolean useMachineConfig, String ...commands); static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile); static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, final boolean useMachineConfig, String remoteFile); static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, String remoteFile); static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, final boolean useMachineConfig, String remoteFile); static ProcessTaskFactory<Boolean> dontRequireTtyForSudo(SshMachineLocation machine, final boolean failIfCantSudo); static ProcessTaskFactory<Boolean> dontRequireTtyForSudo(SshMachineLocation machine, OnFailingTask onFailingTaskRequested); static Function<ProcessTaskWrapper<?>, String> returningStdoutLoggingInfo(final Logger logger, final boolean requireZero); static TaskFactory<?> installFromUrl(final SshMachineLocation location, final String url, final String destPath); static TaskFactory<?> installFromUrl(final Map<String, ?> props, final SshMachineLocation location, final String url, final String destPath); static TaskFactory<?> installFromUrl(final ResourceUtils utils, final Map<String, ?> props, final SshMachineLocation location, final String url, final String destPath);  }