"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "functionaltests/api/v1/functional/test_secretstores.py" between
barbican-11.0.0.tar.gz and barbican-12.0.0.tar.gz

About: OpenStack Barbican is the OpenStack Key Manager service. It provides secure storage, provisioning and management of secret data.
The "Wallaby" series (latest release).

test_secretstores.py  (barbican-11.0.0):test_secretstores.py  (barbican-12.0.0)
skipping to change at line 33 skipping to change at line 33
CONF = config.get_config() CONF = config.get_config()
admin_a = CONF.rbac_users.admin_a admin_a = CONF.rbac_users.admin_a
creator_a = CONF.rbac_users.creator_a creator_a = CONF.rbac_users.creator_a
observer_a = CONF.rbac_users.observer_a observer_a = CONF.rbac_users.observer_a
auditor_a = CONF.rbac_users.auditor_a auditor_a = CONF.rbac_users.auditor_a
admin_b = CONF.rbac_users.admin_b admin_b = CONF.rbac_users.admin_b
observer_b = CONF.rbac_users.observer_b observer_b = CONF.rbac_users.observer_b
test_user_data_when_enabled = { test_user_data_when_enabled = {
'with_admin_a': {'user': admin_a, 'expected_return': 200}, 'with_admin_a': {'user': admin_a, 'expected_return': 200},
'with_creator_a': {'user': creator_a, 'expected_return': 200},
'with_observer_a': {'user': observer_a, 'expected_return': 200},
'with_auditor_a': {'user': auditor_a, 'expected_return': 200},
}
test_user_data_admin_ops_when_enabled = {
'with_admin_a': {'user': admin_a, 'expected_return': 200},
'with_creator_a': {'user': creator_a, 'expected_return': 403}, 'with_creator_a': {'user': creator_a, 'expected_return': 403},
'with_observer_a': {'user': observer_a, 'expected_return': 403}, 'with_observer_a': {'user': observer_a, 'expected_return': 403},
'with_auditor_a': {'user': auditor_a, 'expected_return': 403}, 'with_auditor_a': {'user': auditor_a, 'expected_return': 403},
} }
test_user_data_when_not_enabled = { test_user_data_when_not_enabled = {
'with_admin_a': {'user': admin_a, 'expected_return': 404}, 'with_admin_a': {'user': admin_a, 'expected_return': 404},
'with_creator_a': {'user': creator_a, 'expected_return': 403}, 'with_creator_a': {'user': creator_a, 'expected_return': 404},
'with_observer_a': {'user': observer_a, 'expected_return': 403}, 'with_observer_a': {'user': observer_a, 'expected_return': 404},
'with_auditor_a': {'user': auditor_a, 'expected_return': 403}, 'with_auditor_a': {'user': auditor_a, 'expected_return': 404},
} }
@utils.parameterized_test_case @utils.parameterized_test_case
class SecretStoresTestCase(base.TestCase): class SecretStoresTestCase(base.TestCase):
"""Functional tests exercising ACL Features""" """Functional tests exercising ACL Features"""
def setUp(self): def setUp(self):
super(SecretStoresTestCase, self).setUp() super(SecretStoresTestCase, self).setUp()
self.secret_behaviors = secret_behaviors.SecretBehaviors(self.client) self.secret_behaviors = secret_behaviors.SecretBehaviors(self.client)
self.ss_behaviors = secretstores_behaviors.SecretStoresBehaviors( self.ss_behaviors = secretstores_behaviors.SecretStoresBehaviors(
self.client) self.client)
skipping to change at line 185 skipping to change at line 192
'server side') 'server side')
@utils.parameterized_dataset(test_user_data_when_not_enabled) @utils.parameterized_dataset(test_user_data_when_not_enabled)
def test_get_a_secret_store_multiple_disabled(self, user, expected_return): def test_get_a_secret_store_multiple_disabled(self, user, expected_return):
resp, _ = self.ss_behaviors.get_project_preferred_store(user_name=user) resp, _ = self.ss_behaviors.get_project_preferred_store(user_name=user)
self.assertEqual(expected_return, resp.status_code) self.assertEqual(expected_return, resp.status_code)
@testcase.skipUnless(base.conf_multiple_backends_enabled, 'executed only ' @testcase.skipUnless(base.conf_multiple_backends_enabled, 'executed only '
'when multiple backends support is enabled in ' 'when multiple backends support is enabled in '
'barbican server side') 'barbican server side')
@utils.parameterized_dataset(test_user_data_when_enabled) @utils.parameterized_dataset(test_user_data_admin_ops_when_enabled)
def test_unset_project_preferred_store_multiple_enabled(self, user, def test_unset_project_preferred_store_multiple_enabled(self, user,
expected_return): expected_return):
resp, json_data = self.ss_behaviors.get_all_secret_stores( resp, json_data = self.ss_behaviors.get_all_secret_stores(
user_name=admin_a) user_name=admin_a)
self.assertEqual(200, resp.status_code) self.assertEqual(200, resp.status_code)
stores = json_data['secret_stores'] stores = json_data['secret_stores']
store = stores[len(stores) - 1] store = stores[len(stores) - 1]
 End of changes. 3 change blocks. 
4 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)