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

Commit

Permalink
Merge pull request #9664 from psimovec/fix_testconfigmanagement
Browse files Browse the repository at this point in the history
[1LP][RFR] Fix tests: test_advanced_search.py::TestConfigManagement
  • Loading branch information
mshriver authored May 6, 2020
2 parents 2c5493d + 4d24026 commit c0c3b75
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ class AnsibleTowerSystem(ConfigSystem):
@attr.s
class AnsibleTowerSystemsCollection(ConfigSystemsCollection):
ENTITY = AnsibleTowerSystem
type_name = "ansible_tower"
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ class SatelliteSystem(ConfigSystem):
@attr.s
class SatelliteSystemsCollection(ConfigSystemsCollection):
ENTITY = SatelliteSystem
type_name = "satellite"
44 changes: 11 additions & 33 deletions cfme/tests/webui/test_advanced_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from cfme import test_requirements
from cfme.cloud.provider import CloudProvider
from cfme.containers.provider import ContainersProvider
from cfme.infrastructure.config_management import ConfigManagerProvider
from cfme.infrastructure.config_management import ConfigSystem
from cfme.infrastructure.provider import InfraProvider
from cfme.markers.env_markers.provider import ONE_PER_CATEGORY
from cfme.physical.provider import PhysicalProvider
Expand All @@ -17,18 +15,16 @@
from cfme.services.workloads import VmsInstances
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.blockers import BZ
from cfme.utils.blockers import GH

SearchParam = namedtuple("SearchParam",
["collection", "destination", "entity", "filter", "my_filters"])
["collection", "destination", "entity", "filter", "my_filters", ])

pytestmark = [
pytest.mark.uncollectif(lambda param, appliance:
(param.collection in [ConfigManagerProvider, 'config_managers'] or
param.filter == 'Job Template (Ansible Tower) : Name') or
pytest.mark.uncollectif(
lambda param, appliance:
(appliance.version >= '5.11' and param.entity == 'network_load_balancers'),
reason='load balancers are no longer supported in 5.11 -> BZ 1672949'),
pytest.mark.meta(automates=[BZ(1402392)]) # should be only on test_filter_crud
reason='load balancers are no longer supported in 5.11 -> BZ 1672949 '),
pytest.mark.meta(automates=[BZ(1402392), BZ(1777493)])
]


Expand Down Expand Up @@ -296,25 +292,6 @@ class TestContainers:
pytestmark = base_pytestmarks(params_values, True)


@inject_tests
@pytest.mark.meta(blockers=[GH('ManageIQ/integration_tests:9723')])
class TestAnsibleTower:
params_values = [
SearchParam('ansible_tower_providers', 'All', 'ansible_tower_explorer_provider',
'Automation Manager (Ansible Tower) : Name',
('sidebar.providers', 'All Ansible Tower Providers')),

SearchParam('ansible_tower_systems', 'All', 'ansible_tower_explorer_system',
'Configured System (Ansible Tower) : Hostname',
('sidebar.configured_systems', 'All Ansible Tower Configured Systems')),
SearchParam('ansible_tower_job_templates', 'All', 'ansible_tower_explorer_job_templates',
'Job Template (Ansible Tower) : Name',
('sidebar.job_templates', 'All Ansible Tower Job Templates')),
SearchParam('ansible_tower_jobs', 'All', 'ansible_tower_jobs',
'Ansible Tower Job : Name', None)]
pytestmark = base_pytestmarks(params_values)


@inject_tests
class TestStorage:
params_values = [
Expand All @@ -332,15 +309,16 @@ class TestStorage:


@inject_tests
@pytest.mark.meta(blockers=[GH('ManageIQ/integration_tests:9723')])
class TestConfigManagement:
params_values = [
SearchParam(ConfigManagerProvider, 'All', 'configuration_management',
'Configuration Manager : Name',
('sidebar.providers', "All Configuration Management Providers")),
SearchParam(ConfigSystem, 'All', 'configuration_management_systems',
SearchParam('satellite_systems', 'All', 'configuration_management_systems',
'Configured System (Red Hat Satellite) : Hostname',
('sidebar.configured_systems', "All Configured Systems")),
SearchParam('ansible_tower_systems', 'All', 'ansible_tower_explorer_system',
'Configured System (Ansible Tower) : Hostname',
('sidebar.configured_systems', 'All Ansible Tower Configured Systems')),
SearchParam('ansible_tower_jobs', 'All', 'ansible_tower_jobs', 'Ansible Tower Job : Name',
None)
]
pytestmark = base_pytestmarks(params_values)

Expand Down

0 comments on commit c0c3b75

Please sign in to comment.