mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
tests/posixacl: move setUp and tearDown to top
Make it clear to find out what we have in test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13521 Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
6875f4354a
commit
1c09fc2de3
@ -32,6 +32,20 @@ ACL = "O:S-1-5-21-2212615479-2695158682-2101375467-512G:S-1-5-21-2212615479-2695
|
||||
|
||||
class PosixAclMappingTests(TestCaseInTempDir):
|
||||
|
||||
def setUp(self):
|
||||
super(PosixAclMappingTests, self).setUp()
|
||||
s3conf = s3param.get_context()
|
||||
s3conf.load(self.get_loadparm().configfile)
|
||||
s3conf.set("xattr_tdb:file", os.path.join(self.tempdir, "xattr.tdb"))
|
||||
self.lp = s3conf
|
||||
self.tempf = os.path.join(self.tempdir, "test")
|
||||
open(self.tempf, 'w').write("empty")
|
||||
|
||||
def tearDown(self):
|
||||
smbd.unlink(self.tempf)
|
||||
os.unlink(os.path.join(self.tempdir, "xattr.tdb"))
|
||||
super(PosixAclMappingTests, self).tearDown()
|
||||
|
||||
def print_posix_acl(self, posix_acl):
|
||||
aclstr = ""
|
||||
for entry in posix_acl.acl:
|
||||
@ -774,19 +788,3 @@ class PosixAclMappingTests(TestCaseInTempDir):
|
||||
# a_perm: 7
|
||||
# uid: -1
|
||||
# gid: -1
|
||||
|
||||
#
|
||||
|
||||
def setUp(self):
|
||||
super(PosixAclMappingTests, self).setUp()
|
||||
s3conf = s3param.get_context()
|
||||
s3conf.load(self.get_loadparm().configfile)
|
||||
s3conf.set("xattr_tdb:file", os.path.join(self.tempdir,"xattr.tdb"))
|
||||
self.lp = s3conf
|
||||
self.tempf = os.path.join(self.tempdir, "test")
|
||||
open(self.tempf, 'w').write("empty")
|
||||
|
||||
def tearDown(self):
|
||||
smbd.unlink(self.tempf)
|
||||
os.unlink(os.path.join(self.tempdir,"xattr.tdb"))
|
||||
super(PosixAclMappingTests, self).tearDown()
|
||||
|
Loading…
Reference in New Issue
Block a user