From 4fe135300dbb7b7c9f3f0d0676ea76149414fb6b Mon Sep 17 00:00:00 2001 From: Alpha Date: Mon, 31 Aug 2015 01:28:53 -0400 Subject: Disable logging by default Superusers should not be required to use this API with default settings. Provide a disable_logging method of Volume. Ensure that set_logging gets called with new values. Change-Id: Ia27a682c96d6ca28f85d43f9d8483f08d1dc6367 Signed-off-by: Alpha Signed-off-by: Prashanth Pai --- test/functional/libgfapi-python-tests.py | 2 +- test/unit/gluster/test_gfapi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/functional/libgfapi-python-tests.py b/test/functional/libgfapi-python-tests.py index 58bda89..8f631d4 100644 --- a/test/functional/libgfapi-python-tests.py +++ b/test/functional/libgfapi-python-tests.py @@ -1095,7 +1095,7 @@ class TestVolumeInit(unittest.TestCase): # Create volume object instance vol = Volume(HOST, VOLNAME) # Check attribute init - self.assertEqual(vol.log_file, None) + self.assertEqual(vol.log_file, "/dev/null") self.assertEqual(vol.log_level, 7) self.assertEqual(vol.host, HOST) self.assertEqual(vol.volname, VOLNAME) diff --git a/test/unit/gluster/test_gfapi.py b/test/unit/gluster/test_gfapi.py index 4b58597..4216f96 100644 --- a/test/unit/gluster/test_gfapi.py +++ b/test/unit/gluster/test_gfapi.py @@ -449,7 +449,7 @@ class TestVolume(unittest.TestCase): _m_set_logging = Mock(return_value=-1) with patch("gluster.gfapi.api.glfs_set_logging", _m_set_logging): self.assertRaises(LibgfapiException, v.set_logging, "/dev/null", 7) - _m_set_logging.assert_called_once_with(v.fs, None, 7) + _m_set_logging.assert_called_once_with(v.fs, "/dev/null", 7) def test_chmod_success(self): mock_glfs_chmod = Mock() -- cgit