Esempio n. 1
0
        public async Task CopyTo()
        {
            var repro1 = BuildRepro("repro1");

            BuildDatset(repro1, "ds1", "f1.root", "f2.root");
            var repro2 = BuildRepro("repro2");

            var place1 = new PlaceLocalWindowsDisk("test1", repro1);
            var place2 = new PlaceLocalWindowsDisk("test2", repro2);

            DataSetManager.ResetDSM(place1, place2);

            Assert.IsNull(await place2.GetListOfFilesForDataSetAsync("ds1"));
            await place1.CopyToAsync(place2, (await place1.GetListOfFilesForDataSetAsync("ds1")).Select(f => new Uri($"gridds://ds1/{f}")).ToArray());

            Assert.AreEqual(2, (await place2.GetListOfFilesForDataSetAsync("ds1")).Length);
        }
Esempio n. 2
0
        public async Task CopyToSCPTarget()
        {
            // Build remote dataset up on linux
            _ssh.CreateRepro();
            var place1 = new PlaceLinuxRemote("test1", _ssh.RemotePath, _ssh.RemoteHostInfo);

            var repro1 = BuildRepro("repro2");

            BuildDatset(repro1, "ds1", "f1.root", "f2.root");
            var place2 = new PlaceLocalWindowsDisk("test1", repro1);

            DataSetManager.ResetDSM(place1, place2);

            var uris = new Uri[] { new Uri("gridds://ds1/f1.root"), new Uri("gridds://ds1/f2.root") };
            await place2.CopyToAsync(place1, uris);

            var files = await place1.GetListOfFilesForDataSetAsync("ds1");

            Assert.AreEqual(2, files.Length);
            Assert.IsTrue(await place1.HasFileAsync(uris[0]));
            Assert.IsTrue(await place1.HasFileAsync(uris[1]));
        }