public async Task CopyFromTwoStep() { DataSetManager.ResetDSM(); _ssh.CreateRepro(); _ssh.CreateDS("ds1", "f1.root", "f2.root"); var p1 = new PlaceLinuxRemote("test1", _ssh.RemotePath, _ssh.RemoteHostInfo); _ssh.CreateRepro(_ssh.RemotePath + "2"); var p2 = new PlaceLinuxRemote("test2", _ssh.RemotePath + "2", _ssh.RemoteHostInfo); DataSetManager.ResetDSM(p1, p2); var fileList = new Uri[] { new Uri("gridds://ds1/f1.root"), new Uri("gridds://ds1/f2.root") }; await p2.CopyFromAsync(p1, fileList.Take(1).ToArray()); Assert.IsTrue(await p2.HasFileAsync(fileList[0])); Assert.IsFalse(await p2.HasFileAsync(fileList[1])); await p2.CopyFromAsync(p1, fileList.Skip(1).ToArray()); Assert.IsTrue(await p2.HasFileAsync(fileList[1])); }
public async Task CopyFrom() { _ssh.CreateRepro(); _ssh.CreateDS("ds1", "f1.root", "f2.root"); var p1 = new PlaceLinuxRemote("test1", _ssh.RemotePath, _ssh.RemoteHostInfo); var p2 = new PlaceLinuxRemote("test2", _ssh.RemotePath + "2", _ssh.RemoteHostInfo); DataSetManager.ResetDSM(p1, p2); var fileList = new Uri[] { new Uri("gridds://ds1/f1.root"), new Uri("gridds://ds1/f2.root") }; await p2.CopyFromAsync(p1, fileList); Assert.IsTrue(await p2.HasFileAsync(fileList[0])); Assert.AreEqual(2, (await p2.GetListOfFilesForDataSetAsync("ds1")).Length); }
public async Task CopyFromViaTunnelWithPassword() { _ssh = new UtilsForBuildingLinuxDatasets("LinuxRemoteTestTunnelBigData"); _ssh.CreateRepro(); var p1 = new PlaceLinuxRemote("test", _ssh.RemotePath, _ssh.RemoteHostInfo); var sshRemote = new UtilsForBuildingLinuxDatasets(); sshRemote.CreateRepro(); sshRemote.CreateDS("ds1", "f1.root", "f2.root"); var p2 = new PlaceLinuxRemote("test", sshRemote.RemotePath, sshRemote.RemoteHostInfo); DataSetManager.ResetDSM(p1, p2); var fileList = new Uri[] { new Uri("gridds://ds1/f1.root"), new Uri("gridds://ds1/f2.root") }; await p1.CopyFromAsync(p2, fileList); Assert.IsTrue(await p1.HasFileAsync(fileList[0])); }