Exemplo n.º 1
0
        public async Task GetReproDatasetFileListForBadDS()
        {
            _ssh.CreateRepro();
            _ssh.CreateDS("ds1", "f1.root", "f2.root");
            var p = new PlaceLinuxRemote("test", _ssh.RemotePath, _ssh.RemoteHostInfo);

            DataSetManager.ResetDSM(p);
            var files = await p.GetListOfFilesForDataSetAsync("ds2");

            Assert.IsNull(files);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public async Task CopyOneFilesTunnel()
        {
            // Should be setup to deal with about 4 GB of data in one file.
            _ssh = new UtilsForBuildingLinuxDatasets("LinuxRemoteTestTunnelBigData");
            _ssh.CreateRepro();
            var local_p = new PlaceLinuxRemote("test", _ssh.RemotePath, _ssh.RemoteHostInfo);
            var grid_p  = new PlaceGRID("test-GRID", local_p);

            DataSetManager.ResetDSM(local_p, grid_p);

            var uris = new Uri[]
            {
                new Uri($"gridds://{_good_dsname}/{_good_dsfile_1}"),
            };

            await grid_p.CopyToAsync(local_p, uris);

            var files = await local_p.GetListOfFilesForDataSetAsync(_good_dsname);

            Assert.AreEqual(197, files.Length);
            Assert.IsTrue(await local_p.HasFileAsync(uris[0]));
        }
Exemplo n.º 4
0
        public async Task CopyTwoFiles()
        {
            _ssh.CreateRepro();
            var local_p = new PlaceLinuxRemote("test", _ssh.RemotePath, _ssh.RemoteHostInfo);
            var grid_p  = new PlaceGRID("test-GRID", local_p);

            DataSetManager.ResetDSM(local_p, grid_p);

            var uris = new Uri[]
            {
                new Uri($"gridds://{_good_dsname}/{_good_dsfile_1}"),
                new Uri($"gridds://{_good_dsname}/{_good_dsfile_2}"),
            };

            await grid_p.CopyToAsync(local_p, uris);

            var files = await local_p.GetListOfFilesForDataSetAsync(_good_dsname);

            Assert.AreEqual(197, files.Length);
            Assert.IsTrue(await local_p.HasFileAsync(uris[0]));
            Assert.IsTrue(await local_p.HasFileAsync(uris[1]));
        }
Exemplo n.º 5
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]));
        }