Example #1
0
 def test_check_user_xattr_bad_remove(self):
     td = tempfile.mkdtemp()
     xkey = _xkey(td, 'user.test.key1')
     _xattr_rem_err[xkey] = errno.EOPNOTSUPP
     try:
         utils.check_user_xattr(td)
     except IOError:
         self.fail("Unexpected IOError")
     finally:
         shutil.rmtree(td)
Example #2
0
 def test_check_user_xattr_bad_remove(self):
     td = tempfile.mkdtemp()
     xkey = _xkey(td, "user.test.key1")
     _xattr_rem_err[xkey] = errno.EOPNOTSUPP
     try:
         utils.check_user_xattr(td)
     except IOError:
         self.fail("Unexpected IOError")
     finally:
         shutil.rmtree(td)
Example #3
0
 def test_check_user_xattr_bad_set(self):
     td = tempfile.mkdtemp()
     xkey = _xkey(td, "user.test.key1")
     _xattr_set_err[xkey] = errno.EOPNOTSUPP
     try:
         assert False == utils.check_user_xattr(td)
     except IOError:
         pass
     else:
         self.fail("Expected IOError")
     finally:
         shutil.rmtree(td)
Example #4
0
 def test_check_user_xattr_bad_set(self):
     td = tempfile.mkdtemp()
     xkey = _xkey(td, 'user.test.key1')
     _xattr_set_err[xkey] = errno.EOPNOTSUPP
     try:
         assert False == utils.check_user_xattr(td)
     except IOError:
         pass
     else:
         self.fail("Expected IOError")
     finally:
         shutil.rmtree(td)
Example #5
0
 def test_check_user_xattr(self):
     td = tempfile.mkdtemp()
     try:
         assert utils.check_user_xattr(td)
     finally:
         shutil.rmtree(td)
Example #6
0
 def test_check_user_xattr_bad_path(self):
     assert False == utils.check_user_xattr("/tmp/foo/bar/check/user/xattr")
Example #7
0
 def test_check_user_xattr(self):
     td = tempfile.mkdtemp()
     try:
         assert utils.check_user_xattr(td)
     finally:
         shutil.rmtree(td)
Example #8
0
 def test_check_user_xattr_bad_path(self):
     assert False == utils.check_user_xattr("/tmp/foo/bar/check/user/xattr")