s4-selftest: Try to make ntacl unit tests better match their names
authorAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2012 07:54:34 +0000 (17:54 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2012 07:52:23 +0000 (09:52 +0200)
We are trying to test combinations of setting and getting via the VFS
and directly to the underlying DB.

Andrew Bartlett

source4/scripting/python/samba/tests/posixacl.py

index 64c997d96a58008630c8bf26145c37c35c4bae30..7f7971cac03a7df91b2e2718af3d6e0e272d84c9 100644 (file)
@@ -59,7 +59,7 @@ class PosixAclMappingTests(TestCase):
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
         setntacl(lp,tempf,acl,"S-1-5-21-2212615479-2695158682-2101375467", use_ntvfs=True)
-        facl = getntacl(lp,tempf)
+        facl = getntacl(lp,tempf, direct_db_access=True)
         anysid = security.dom_sid(security.SID_NT_SELF)
         self.assertEquals(facl.as_sddl(anysid),acl)
         os.unlink(tempf)
@@ -72,8 +72,8 @@ class PosixAclMappingTests(TestCase):
         acl = "O:S-1-5-21-2212615479-2695158682-2101375467-512G:S-1-5-21-2212615479-2695158682-2101375467-513D:(A;OICI;0x001f01ff;;;S-1-5-21-2212615479-2695158682-2101375467-512)"
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
-        setntacl(lp,tempf,acl,"S-1-5-21-2212615479-2695158682-2101375467", use_ntvfs=False)
-        facl = getntacl(lp,tempf, direct_db_access=True)
+        setntacl(lp,tempf,acl,"S-1-5-21-2212615479-2695158682-2101375467", use_ntvfs=True)
+        facl = getntacl(lp,tempf, direct_db_access=False)
         anysid = security.dom_sid(security.SID_NT_SELF)
         self.assertEquals(facl.as_sddl(anysid),acl)
         os.unlink(tempf)
@@ -86,8 +86,8 @@ class PosixAclMappingTests(TestCase):
         acl = "O:S-1-5-21-2212615479-2695158682-2101375467-512G:S-1-5-21-2212615479-2695158682-2101375467-513D:(A;OICI;0x001f01ff;;;S-1-5-21-2212615479-2695158682-2101375467-512)"
         tempf = os.path.join(path,"pytests"+str(int(100000*random.random())))
         open(tempf, 'w').write("empty")
-        setntacl(lp,tempf,acl,"S-1-5-21-2212615479-2695158682-2101375467", use_ntvfs=True)
-        facl = getntacl(lp,tempf, direct_db_access=True)
+        setntacl(lp,tempf,acl,"S-1-5-21-2212615479-2695158682-2101375467", use_ntvfs=False)
+        facl = getntacl(lp,tempf, direct_db_access=False)
         anysid = security.dom_sid(security.SID_NT_SELF)
         self.assertEquals(facl.as_sddl(anysid),acl)
         os.unlink(tempf)