public static void Setup() { conf = ViewFileSystemTestSetup.CreateConfig(); fs1 = SetupFileSystem(new URI("fs1:///"), typeof(TestViewFileSystemDelegationTokenSupport.FakeFileSystem )); fs2 = SetupFileSystem(new URI("fs2:///"), typeof(TestViewFileSystemDelegationTokenSupport.FakeFileSystem )); viewFs = FileSystem.Get(FsConstants.ViewfsUri, conf); }
/// <exception cref="System.Exception"/> internal static TestViewFileSystemDelegationTokenSupport.FakeFileSystem SetupFileSystem (URI uri, Type clazz) { string scheme = uri.GetScheme(); conf.Set("fs." + scheme + ".impl", clazz.FullName); TestViewFileSystemDelegationTokenSupport.FakeFileSystem fs = (TestViewFileSystemDelegationTokenSupport.FakeFileSystem )FileSystem.Get(uri, conf); // mount each fs twice, will later ensure 1 token/fs ConfigUtil.AddLink(conf, "/mounts/" + scheme + "-one", fs.GetUri()); ConfigUtil.AddLink(conf, "/mounts/" + scheme + "-two", fs.GetUri()); return(fs); }