示例#1
0
 public virtual void SetUp()
 {
     fcTarget        = fc;
     fcTarget2       = fc2;
     targetTestRoot  = fileContextTestHelper.GetAbsoluteTestRootPath(fc);
     targetTestRoot2 = fileContextTestHelper.GetAbsoluteTestRootPath(fc2);
     fcTarget.Delete(targetTestRoot, true);
     fcTarget2.Delete(targetTestRoot2, true);
     fcTarget.Mkdir(targetTestRoot, new FsPermission((short)0x1e8), true);
     fcTarget2.Mkdir(targetTestRoot2, new FsPermission((short)0x1e8), true);
     fsViewConf = ViewFileSystemTestSetup.CreateConfig();
     SetupMountPoints();
     fcView = FileContext.GetFileContext(FsConstants.ViewfsUri, fsViewConf);
 }
示例#2
0
 // Also try viewfs://default/    - note authority is name of mount table
 /// <exception cref="System.IO.IOException"/>
 internal virtual void InitializeTargetTestRoot()
 {
     targetTestRoot = fileContextTestHelper.GetAbsoluteTestRootPath(fcTarget);
     // In case previous test was killed before cleanup
     fcTarget.Delete(targetTestRoot, true);
     fcTarget.Mkdir(targetTestRoot, FileContext.DefaultPerm, true);
 }
示例#3
0
        public virtual void SetUp()
        {
            // create the test root on local_fs
            fcTarget   = FileContext.GetLocalFSFileContext();
            chrootedTo = fileContextTestHelper.GetAbsoluteTestRootPath(fcTarget);
            // In case previous test was killed before cleanup
            fcTarget.Delete(chrootedTo, true);
            fcTarget.Mkdir(chrootedTo, FileContext.DefaultPerm, true);
            Configuration conf = new Configuration();

            // ChRoot to the root of the testDirectory
            fc = FileContext.GetFileContext(new ChRootedFs(fcTarget.GetDefaultFileSystem(), chrootedTo
                                                           ), conf);
        }