summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional_auth/gswauth/conf/proxy-server.conf1
-rw-r--r--test/unit/common/middleware/gswauth/swauth/test_middleware.py14
2 files changed, 15 insertions, 0 deletions
diff --git a/test/functional_auth/gswauth/conf/proxy-server.conf b/test/functional_auth/gswauth/conf/proxy-server.conf
index ddb0290..90beb51 100644
--- a/test/functional_auth/gswauth/conf/proxy-server.conf
+++ b/test/functional_auth/gswauth/conf/proxy-server.conf
@@ -64,6 +64,7 @@ user_test_tester3 = testing3
use = egg:gluster_swift#swauth
set log_name = swauth
super_admin_key = swauthkey
+metadata_volume = gsmetadata
[filter:cache]
use = egg:swift#memcache
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({