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); }
// 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); }
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); }