public void TestExportFileProperties() { var acls = FilePropertiesUnitTest.GetAclEntryForSet(); var stats = _adlsClient.ChangeAcl(rootPath, acls, RequestedAclType.SetAcl); _adlsClient.GetFileProperties(rootPath, true, @"C:\Data\logFile"); Assert.IsTrue(File.Exists(@"C:\Data\logFile")); _adlsClient.GetFileProperties(rootPath, true, "/Data/logFile", true, false); Assert.IsTrue(_adlsClient.GetDirectoryEntry("/Data/logFile") != null); }
public void TestModifyAndRemoveAclRecursively() { var acls = FilePropertiesUnitTest.GetAclEntryForModifyAndRemove(); var stats = _adlsClient.ChangeAcl(rootPath, acls, RequestedAclType.ModifyAcl, 1, null, default(CancellationToken)); Assert.IsTrue(stats.DirectoryProcessed == 3); Assert.IsTrue(stats.FilesProcessed == 1); Assert.IsTrue(VerifyChangeAclJob.CheckAclListContains(_adlsClient.GetAclStatus(rootPath).Entries, acls)); Assert.IsTrue(VerifyChangeAclJob.CheckAclListContains(_adlsClient.GetAclStatus(rootPath + "/b0/c0").Entries, acls)); Assert.IsTrue(VerifyChangeAclJob.CheckAclListContains(_adlsClient.GetAclStatus(rootPath + "/bFile01").Entries, acls)); stats = _adlsClient.ChangeAcl(rootPath, acls, RequestedAclType.RemoveAcl, 1, null, default(CancellationToken)); Assert.IsTrue(stats.DirectoryProcessed == 3); Assert.IsTrue(stats.FilesProcessed == 1); Assert.IsTrue(VerifyChangeAclJob.CheckAclListContains(_adlsClient.GetAclStatus(rootPath).Entries, acls, true)); Assert.IsTrue(VerifyChangeAclJob.CheckAclListContains(_adlsClient.GetAclStatus(rootPath + "/b0/c0").Entries, acls, true)); Assert.IsTrue(VerifyChangeAclJob.CheckAclListContains(_adlsClient.GetAclStatus(rootPath + "/bFile01").Entries, acls, true)); }