From fc318e921b073cdbe9fbe62b8c893634b057f0e8 Mon Sep 17 00:00:00 2001 From: Thiago da Silva Date: Thu, 19 Feb 2015 17:00:11 -0500 Subject: adding chmod and fchmod Change-Id: Iba5f4e72a257adeb8ec78b267dfdef26a1ec66f1 Signed-off-by: Thiago da Silva --- test/functional/libgfapi-python-tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/functional') diff --git a/test/functional/libgfapi-python-tests.py b/test/functional/libgfapi-python-tests.py index 8bcbf45..4dbdf2d 100644 --- a/test/functional/libgfapi-python-tests.py +++ b/test/functional/libgfapi-python-tests.py @@ -163,6 +163,16 @@ class FileOpsTest(unittest.TestCase): except OSError as e: self.fail(e.message) + def test_chmod(self): + stat = self.vol.stat(self.path) + orig_mode = oct(stat.st_mode & 0777) + self.assertEqual(orig_mode, '0644L') + ret = self.vol.chmod(self.path, 0600) + self.assertEqual(ret, 0) + stat = self.vol.stat(self.path) + new_mode = oct(stat.st_mode & 0777) + self.assertEqual(new_mode, '0600L') + def test_exists(self): e = self.vol.exists(self.path) self.assertTrue(e) -- cgit