summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gluster/gfapi.py4
-rw-r--r--test/functional/libgfapi-python-tests.py2
-rw-r--r--test/unit/gluster/test_gfapi.py4
-rwxr-xr-xtools/functional_tests.sh2
4 files changed, 6 insertions, 6 deletions
diff --git a/gluster/gfapi.py b/gluster/gfapi.py
index c2c267c..7d09102 100644
--- a/gluster/gfapi.py
+++ b/gluster/gfapi.py
@@ -218,8 +218,8 @@ class Volume(object):
raise OSError(err, os.strerror(err))
return x
- def mkdir(self, path):
- ret = api.glfs_mkdir(self.fs, path)
+ def mkdir(self, path, mode):
+ ret = api.glfs_mkdir(self.fs, path, mode)
if ret < 0:
err = ctypes.get_errno()
raise OSError(err, os.strerror(err))
diff --git a/test/functional/libgfapi-python-tests.py b/test/functional/libgfapi-python-tests.py
index 30a1732..d0703df 100644
--- a/test/functional/libgfapi-python-tests.py
+++ b/test/functional/libgfapi-python-tests.py
@@ -94,7 +94,7 @@ class DirOpsTest(unittest.TestCase):
def setUp(self):
self.data = loremipsum.get_sentence()
self.dir_path = self._testMethodName + "_dir"
- self.vol.mkdir(self.dir_path)
+ self.vol.mkdir(self.dir_path, 0755)
self.file_path = self.dir_path + "/" + self.testfile
with self.vol.creat(
self.file_path, os.O_WRONLY | os.O_EXCL, 0644) as fd:
diff --git a/test/unit/gluster/test_gfapi.py b/test/unit/gluster/test_gfapi.py
index 07c4e92..6270148 100644
--- a/test/unit/gluster/test_gfapi.py
+++ b/test/unit/gluster/test_gfapi.py
@@ -265,7 +265,7 @@ class TestVolume(unittest.TestCase):
with patch("gluster.gfapi.api.glfs_mkdir", mock_glfs_mkdir):
vol = gfapi.Volume("localhost", "test")
- ret = vol.mkdir("testdir")
+ ret = vol.mkdir("testdir", 0775)
self.assertEquals(ret, 0)
def test_mkdir_fail_exception(self):
@@ -274,7 +274,7 @@ class TestVolume(unittest.TestCase):
with patch("gluster.gfapi.api.glfs_mkdir", mock_glfs_mkdir):
vol = gfapi.Volume("localhost", "test")
- self.assertRaises(OSError, vol.mkdir, "testdir")
+ self.assertRaises(OSError, vol.mkdir, "testdir", 0775)
def test_open_success(self):
mock_glfs_open = Mock()
diff --git a/tools/functional_tests.sh b/tools/functional_tests.sh
index ef0934c..a347e1e 100755
--- a/tools/functional_tests.sh
+++ b/tools/functional_tests.sh
@@ -54,7 +54,7 @@ done
mkdir functional_tests > /dev/null 2>&1
-sudo_env nosetests -v --exe \
+nosetests -v --exe \
--with-xunit \
--xunit-file functional_tests/libgfapi-python.xml \
--with-html-output \