summaryrefslogtreecommitdiffstats
path: root/test/unit/common
diff options
context:
space:
mode:
authorThiago da Silva <thiago@redhat.com>2013-11-04 17:08:22 -0500
committerLuis Pabon <lpabon@redhat.com>2013-11-05 17:23:33 -0800
commita5c772955f5f74c2244d298641be9e2a448c9b94 (patch)
treea44e9c19e277a18c61fd606ca902e31d0e58c433 /test/unit/common
parent2bd930bb442d29aab176651a27cee8dab0dee4eb (diff)
make gluster volume name configurable
changed code to look at configuration file for the metadata gluster volume name. The default is still gsmetadata Change-Id: I9bf74b9566ea1c9716c42f7ced0f999e02824868 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6225 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'test/unit/common')
-rw-r--r--test/unit/common/middleware/gswauth/swauth/test_middleware.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/common/middleware/gswauth/swauth/test_middleware.py b/test/unit/common/middleware/gswauth/swauth/test_middleware.py
index 71c57ab..9ecd7d6 100644
--- a/test/unit/common/middleware/gswauth/swauth/test_middleware.py
+++ b/test/unit/common/middleware/gswauth/swauth/test_middleware.py
@@ -194,6 +194,20 @@ class TestAuth(unittest.TestCase):
'Invalid auth_type in config file: %s' %
'Nonexistant')
+ def test_default_metadata_volume_init(self):
+ app = FakeApp()
+ ath = auth.filter_factory({})(app)
+ self.assertEquals(ath.metadata_volume, 'gsmetadata')
+
+ def test_conf_metadata_volume_init(self):
+ app = FakeApp()
+ ath = auth.filter_factory(
+ {'metadata_volume': 'meta_test'})(app)
+ self.assertEquals(ath.metadata_volume, 'meta_test')
+ ath = auth.filter_factory(
+ {'metadata_volume': 'new_meta_volume'})(app)
+ self.assertEquals(ath.metadata_volume, 'new_meta_volume')
+
def test_default_swift_cluster_init(self):
app = FakeApp()
self.assertRaises(Exception, auth.filter_factory({