GUI acceptance tests using environment deployed from packages.
Build: #2812 failed
Job: Onezone harvesters effective privileges failed
user sees that group effective privileges are the sum of its direct parent direct privileges and its direct privileges[1oz 1op elasticsearch]: Test case result
The below summarizes the result of the test " user sees that group effective privileges are the sum of its direct parent direct privileges and its direct privileges[1oz 1op elasticsearch]" in build 2,812 of Onedata Products - gui acceptance pkg - Onezone harvesters effective privileges.
- Description
- user sees that group effective privileges are the sum of its direct parent direct privileges and its direct privileges[1oz 1op elasticsearch]
- Test class
- gui.scenarios.test_onezone_harvesters_effective_privileges
- Method
- test_user_sees_that_group_effective_privileges_are_the_sum_of_its_direct_parent_direct_privileges_and_its_direct_privileges[1oz_1op_elasticsearch]
- Jira Issue
-
- Duration
- 3 mins
- Status
- Failed (New Failure)
Error Log
AssertionError: Harvester management should be granted but is not selenium = {'browser_admin': <selenium.webdriver.chrome.webdriver.WebDriver (session="9c0fba3800695dcabc5114d3d3561219")>, 'browser_user2': <selenium.webdriver.chrome.webdriver.WebDriver (session="4e205d5fc16d2d49b5cc66916d15a4f2")>} browser_id = 'browser_admin', member_name = 'child_group_1' member_type = 'groups', where = 'harvester' config = 'Harvester management:\n granted: True\nUser management:\n granted: False\nGroup management:\n granted: True\nSpace management:\n granted: False' onepanel = <class 'tests.gui.utils.onepanel.Onepanel'> oz_page = <class 'tests.gui.utils.onezone.OZLoggedIn'>, option = 'effective ' @wt(parsers.re('user of (?P<browser_id>.*) sees following ' '(?P<option>effective |)privileges of ' '"(?P<member_name>.*)" (?P<member_type>user|group) ' 'in (?P<where>space|group|harvester|automation|cluster) ' 'members subpage:\n(?P<config>(.|\s)*)')) def assert_privileges_in_members_subpage(selenium, browser_id, member_name, member_type, where, config, onepanel, oz_page, option): member_type = member_type + 's' privileges = yaml.load(config) tree = get_privilege_tree(selenium, browser_id, onepanel, oz_page, where, member_type, member_name) is_direct_privileges = False if option == 'effective ' else True # wait for set privileges to be visible in gui try: > tree.assert_privileges(selenium, browser_id, privileges, is_direct_privileges) tests/gui/steps/onezone/members.py:592: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.gui.utils.common.privilege_tree.PrivilegeTree object at 0x7f8f06a6cc40> selenium = {'browser_admin': <selenium.webdriver.chrome.webdriver.WebDriver (session="9c0fba3800695dcabc5114d3d3561219")>, 'browser_user2': <selenium.webdriver.chrome.webdriver.WebDriver (session="4e205d5fc16d2d49b5cc66916d15a4f2")>} browser_id = 'browser_admin' privileges = {'Group management': {'granted': True}, 'Harvester management': {'granted': True}, 'Space management': {'granted': False}, 'User management': {'granted': False}} is_direct_privileges = False def assert_privileges(self, selenium, browser_id, privileges, is_direct_privileges=True): """Assert privileges according to given config. For this method only dict should be passed! Config format given in earlier in yaml is as follow: privilege_type: granted: True/False/Partially privilege subtypes: ---> always and only when granted is Partially privilege_subtype: True/False ... Space management: granted: Partially privilege subtypes: Modify space: True Remove space: False User management: granted: False """ > self._assert_privileges(selenium, browser_id, privileges, is_direct_privileges) tests/gui/utils/common/privilege_tree.py:193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.gui.utils.common.privilege_tree.PrivilegeTree object at 0x7f8f06a6cc40> selenium = {'browser_admin': <selenium.webdriver.chrome.webdriver.WebDriver (session="9c0fba3800695dcabc5114d3d3561219")>, 'browser_user2': <selenium.webdriver.chrome.webdriver.WebDriver (session="4e205d5fc16d2d49b5cc66916d15a4f2")>} browser_id = 'browser_admin' privileges = {'Group management': {'granted': True}, 'Harvester management': {'granted': True}, 'Space management': {'granted': False}, 'User management': {'granted': False}} is_direct_privileges = False def _assert_privileges(self, selenium, browser_id, privileges, is_direct_privileges): for privilege_name, privilege_group in privileges.items(): > self._assert_privilege_group(selenium, browser_id, privilege_group, privilege_name, is_direct_privileges) tests/gui/utils/common/privilege_tree.py:199: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.gui.utils.common.privilege_tree.PrivilegeTree object at 0x7f8f06a6cc40> selenium = {'browser_admin': <selenium.webdriver.chrome.webdriver.WebDriver (session="9c0fba3800695dcabc5114d3d3561219")>, 'browser_user2': <selenium.webdriver.chrome.webdriver.WebDriver (session="4e205d5fc16d2d49b5cc66916d15a4f2")>} browser_id = 'browser_admin', group = {'granted': True} name = 'Harvester management', is_direct_privileges = False def _assert_privilege_group(self, selenium, browser_id, group, name, is_direct_privileges): driver = selenium[browser_id] privilege_row = self.privilege_groups[name] granted = group['granted'] if granted == 'Partially': sub_privileges = group['privilege subtypes'] privilege_row.expand(driver) for sub_name, sub_granted in sub_privileges.items(): if is_direct_privileges: self.privileges[sub_name].assert_privilege_granted(sub_granted) else: self.privileges[sub_name].assert_effective_privilege_granted(sub_granted) privilege_row.collapse(driver) if is_direct_privileges: privilege_row.assert_privilege_granted(granted) else: > privilege_row.assert_effective_privilege_granted(granted) tests/gui/utils/common/privilege_tree.py:219: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.gui.utils.common.privilege_tree.PrivilegeGroup object at 0x7f8f06a5f100> granted = True def assert_effective_privilege_granted(self, granted): granted_count = int(self.effective_priv.split('/')[0]) all_count = int(self.effective_priv.split('/')[1]) if granted == 'Partially': msg = f'{self.name} should be partially granted but is not' assert granted_count != all_count and granted_count > 0, msg elif granted: msg = f'{self.name} should be granted but is not' > assert granted_count == all_count, msg E AssertionError: Harvester management should be granted but is not tests/gui/utils/common/privilege_tree.py:136: AssertionError During handling of the above exception, another exception occurred: request = <FixtureRequest for <Function 'test_user_sees_that_group_effective_privileges_are_the_sum_of_its_direct_parent_direct_privileges_and_its_direct_privileges[1oz_1op_elasticsearch]'>> @pytest.mark.usefixtures(*function_args) def scenario_wrapper(request): > _execute_scenario(feature, scenario, request, encoding) /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:189: in _execute_scenario _execute_step_function(request, scenario, step, step_func) /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:130: in _execute_step_function step_func(**kwargs) tests/utils/bdd_utils.py:78: in wrapper return fun(*ba.args, **ba.kwargs) tests/gui/steps/onezone/members.py:596: in assert_privileges_in_members_subpage tree.assert_privileges(selenium, browser_id, privileges, tests/gui/utils/common/privilege_tree.py:193: in assert_privileges self._assert_privileges(selenium, browser_id, privileges, tests/gui/utils/common/privilege_tree.py:199: in _assert_privileges self._assert_privilege_group(selenium, browser_id, privilege_group, tests/gui/utils/common/privilege_tree.py:219: in _assert_privilege_group privilege_row.assert_effective_privilege_granted(granted) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.gui.utils.common.privilege_tree.PrivilegeGroup object at 0x7f8f06a68b20> granted = True def assert_effective_privilege_granted(self, granted): granted_count = int(self.effective_priv.split('/')[0]) all_count = int(self.effective_priv.split('/')[1]) if granted == 'Partially': msg = f'{self.name} should be partially granted but is not' assert granted_count != all_count and granted_count > 0, msg elif granted: msg = f'{self.name} should be granted but is not' > assert granted_count == all_count, msg E AssertionError: Harvester management should be granted but is not tests/gui/utils/common/privilege_tree.py:136: AssertionError