Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[WIPTEST] add websocket for 5.9 testing #10269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIPTEST] add websocket for 5.9 testing #10269

wants to merge 1 commit into from

Conversation

jarovo
Copy link
Contributor

@jarovo jarovo commented Jul 27, 2020

Purpose or Intent

There are failures like this (on CFME 5.10)

cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_approval[ec2-approve]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_approval[ec2-deny]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_approval[ec2-edit]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_from_template[ec2-Auto]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_from_template[ec2-Manual]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_from_template_from_global_region[ec2]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_from_template_using_rest[ec2-Auto]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_from_template_using_rest[ec2-Manual]
cfme/tests/cloud_infra_common/test_provisioning.py/test_provision_with_tag[ec2]
cfme/tests/control/test_compliance.py/test_compliance_instance[cloud]
cfme/tests/infrastructure/test_provisioning_dialog.py/test_provisioning_schedule[ec2]
cfme/tests/infrastructure/test_provisioning_dialog.py/test_tag[ec2]
cfme/tests/services/test_cloud_service_catalogs.py/test_cloud_catalog_item[ec2]
cfme/tests/services/test_provision_stack.py/test_provision_stack[ec2]
cfme/tests/services/test_provision_stack.py/test_read_dialog_timeout_ec2_stack[ec2]
cfme/tests/services/test_provision_stack.py/test_reconfigure_service[ec2]
cfme/tests/services/test_provision_stack.py/test_remove_read_only_orch_template_neg[ec2]
cfme/tests/services/test_provision_stack.py/test_retire_catalog_bundle_service_orchestration_item[ec2]
cfme/tests/services/test_provision_stack.py/test_retire_stack[ec2]
cfme/tests/ssui/test_ssui_myservice.py/test_myservice_crud[ec2-ViaSSUI]
cfme/tests/ssui/test_ssui_myservice.py/test_retire_service_ssui[ec2-ViaSSUI]
cfme/tests/ssui/test_ssui_myservice.py/test_service_start[ec2-ViaSSUI]
cfme/tests/ssui/test_ssui_service_catalogs.py/test_service_catalog_crud_ssui[ec2-ViaSSUI]
cfme/tests/v2v/test_v2v_ansible.py/test_migration_playbooks[openstack-13-virtualcenter-nfs-nfs-rhel7_minimal]
cfme/tests/v2v/test_v2v_ansible.py/test_migration_playbooks[rhevm-4.3-virtualcenter-nfs-nfs-rhel7_minimal]
item = <Function test_provisioning_schedule[ec2]>

    @pytest.hookimpl(hookwrapper=True, tryfirst=True)
    def pytest_runtest_setup(item):
        """Pytest hook ensuring that failures caused by NotImplementedError show up as skips instead"""
        outcome = yield
        try:
>           outcome.get_result()

cfme/fixtures/skip_not_implemented.py:9: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cfme/markers/meta.py:167: in pytest_runtest_setup
    run_plugins(item, plugin.SETUP)
cfme/markers/meta.py:160: in run_plugins
    plug.function(**env)
/var/ci/cfme_venv3/lib64/python3.7/site-packages/kwargify.py:39: in wrapper
    return call_target(*pass_args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <Function test_provisioning_schedule[ec2]>, server_roles = ['+automate']
server_roles_mode = 'add'

    @plugin("server_roles", keys=["server_roles"])  # Could be omitted but I want to keep it clear
    @plugin("server_roles", keys=["server_roles", "server_roles_mode"])
    def add_server_roles(item, server_roles, server_roles_mode="add"):
        # Disable all server roles
        # and then figure out which ones should be enabled
        from cfme.utils.appliance import find_appliance
        current_appliance = find_appliance(item)
        server_settings = current_appliance.server.settings
        roles_with_vals = {k: False for k in available_roles}
        if server_roles is None:
            # Only user interface
            roles_with_vals['user_interface'] = True
        elif server_roles == "default":
            # The ones specified in YAML
            roles_list = cfme_data["server_roles"]["sets"]["default"]
            roles_with_vals.update({k: True for k in roles_list})
        elif server_roles_mode == "add":
            # The ones that are already enabled and enable/disable the ones specified
            # -server_role, +server_role or server_role
            roles_with_vals = server_settings.server_roles_db
            if isinstance(server_roles, str):
                server_roles = server_roles.split(' ')
            for role in server_roles:
                if role.startswith('-'):
                    roles_with_vals[role[1:]] = False
                elif role.startswith('+'):
                    roles_with_vals[role[1:]] = True
                else:
                    roles_with_vals[role] = True
        elif server_roles_mode == "cfmedata":
            roles_list = cfme_data
            # Drills down into cfme_data YAML by selector, expecting a list
            # of roles at the end. A KeyError here probably means the YAML
            # selector is wrong
            for selector in server_roles:
                roles_list = roles_list[selector]
            roles_with_vals.update({k: True for k in roles_list})
        else:
            raise Exception('No server role changes defined.')
    
        if not available_roles.issuperset(set(roles_with_vals)):
            unknown_roles = ', '.join(set(roles_with_vals) - available_roles)
>           raise Exception(f'Unknown server role(s): {unknown_roles}')
E           Exception: Unknown server role(s): websocket

cfme/metaplugins/server_roles.py:94: Exception

PRT Run

{{pytest: --sprout-group downstream-510 cfme/tests/infrastructure/test_provisioning_dialog.py::test_provisioning_schedule -v}}

@jarovo jarovo changed the title WS fix [WIPTEST] WS fix Jul 27, 2020
@jarovo jarovo changed the title [WIPTEST] WS fix [WIPTEST] add webservices for 5.9 testing Aug 25, 2020
@jarovo jarovo changed the title [WIPTEST] add webservices for 5.9 testing [WIPTEST] add websocket for 5.9 testing Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant