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

[1LP][WIP] Automate Ansible non-ascii Hostname test. #9925

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions cfme/tests/ansible/test_embedded_ansible_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,39 +256,6 @@ def test_service_ansible_overridden_extra_vars():
pass


@pytest.mark.tier(3)
def test_service_ansible_playbook_standard_output_non_ascii_hostname():
"""
Look for Standard ouptut

Bugzilla:
1534039

Polarion:
assignee: sbulage
casecomponent: Ansible
caseimportance: medium
initialEstimate: 1/6h
tags: ansible_embed
"""
pass


@pytest.mark.tier(3)
def test_service_ansible_playbook_retire_non_ascii():
"""
Retire ansible playbook service with non_ascii host

Polarion:
assignee: sbulage
casecomponent: Ansible
caseimportance: medium
initialEstimate: 1/6h
tags: ansible_embed
"""
pass


@test_requirements.ansible
@pytest.mark.tier(3)
def test_automate_ansible_playbook_method_type_verbosity():
Expand Down
39 changes: 39 additions & 0 deletions cfme/tests/ansible/test_embedded_ansible_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,3 +1094,42 @@ def _revert():
# Go to Ordered service page and assert new name of service.
service = MyService(appliance, service_name)
assert service.exists


@pytest.mark.tier(3)
@pytest.mark.meta(automates=[1534039])
def test_service_ansible_playbook_order_non_ascii(
appliance,
ansible_catalog_item,
ansible_service_request,
ansible_service_catalog,
ansible_service_funcscope,
):
"""
Look for Standard ouptut
Bugzilla:
1534039
Polarion:
assignee: sbulage
casecomponent: Ansible
caseimportance: medium
initialEstimate: 1/6h
tags: ansible_embed
"""
ele_name = "hosts"
# Extracting Ansible Catalog Item and Element name from fixture.
ansible_cat_item, ansible_catalog = dialog_with_catalog_item(ele_name)
# Navigate to Service Catalog order page.
service_catalogs = ServiceCatalogs(
appliance, ansible_catalog, ansible_cat_item.name)
view = navigate_to(service_catalogs, 'Order')
# Non-ASCII hostname element name.
hostname = fauxfactory.gen_alphanumeric(start="àcon_")
view.fields(ele_name).fill(hostname)
time.sleep(5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use wait_for(lambda: not view.submit_button.disabled, timeout=7) instead of time.sleep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submit button is enabled in the UI. I have tried all possibilities with wait_for and end up time.sleep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

view.submit_button.click()
ansible_service_request.wait_for_request()

# Go to Ordered service page and assert hostname in it.
view = navigate_to(ansible_service_funcscope, "Details")
assert view.provisioning.credentials.get_text_of("Hosts") == hostname