public void TestModifyAclGroup()

in AdlsDotNetSDKUnitTest/SdkUnitTest.cs [2087:2134]


        public void TestModifyAclGroup()
        {
            string path = $"{UnitTestDir}/ModifyAclEntryGroup.txt";
            using (_adlsClient.CreateFile(path, IfExists.Overwrite, "700"))
            {

            }
            AdlsClient nonOwner2 = SetupNonOwnerClient2();
            try
            {
                using (nonOwner2.GetAppendStream(path))
                {

                }
                Assert.Fail("Nonowner2 should not have write permission so AppendStream should raise an exception");
            }
            catch (IOException)
            {
            }
            List<AclEntry> aclList = new List<AclEntry>() {
            new AclEntry(AclType.group, Group1Id, AclScope.Access, AclAction.ReadWrite)};//Non owner client 2
            _adlsClient.ModifyAclEntries(path, aclList);
            try
            {
                using (nonOwner2.GetAppendStream(path))
                {

                }

            }
            catch (IOException)
            {
                Assert.Fail("Nonowner2 should have write permission so AppendStream should not raise an exception");
            }
            try
            {
                using (var istream = nonOwner2.GetReadStream(path))
                {
                    byte[] buffer = new byte[25];
                    istream.Read(buffer, 0, buffer.Length);
                }

            }
            catch (IOException)
            {
                Assert.Fail("Nonowner2 should not have read permission so ReadStream should not raise an exception");
            }
        }