Skip to content

Commit

Permalink
test_positive_end_to_end_bulk_update (SatelliteQE#6956)
Browse files Browse the repository at this point in the history
* Test the Update All Packages button on Update Packages dialogue
* Use the Host Collection view to get to it.
  • Loading branch information
swadeley committed May 30, 2019
1 parent 264fc9f commit c2e7c8d
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/foreman/ui_airgun/test_contenthost.py
Expand Up @@ -213,6 +213,51 @@ def test_positive_end_to_end(session, repos_collection, vm):
assert not session.contenthost.search(vm.hostname)


@upgrade
@tier3
def test_positive_end_to_end_bulk_update(session, repos_collection, vm):
"""Create all entities required for content host, set up host, register it
as a content host, read content host details, install a package (walrus-0.71) and
use bulk action (Update All Packages) to update the package by name (walrus).
:id: d460ba30-82c7-11e9-9af5-54ee754f2151
:expectedresults: content host details are the same as expected, package
installation and update are successful.
:CaseLevel: System
"""
hc_name = gen_string('alpha')
description = gen_string('alpha')
result = vm.run('yum -y install {0}'.format(FAKE_1_CUSTOM_PACKAGE))
assert result.return_code == 0
with session:
# Ensure content host is searchable
assert session.contenthost.search(vm.hostname)[0]['Name'] == vm.hostname
# Update package using bulk action
# use the host collection view to access Update packages dialogue
session.hostcollection.create({
'name': hc_name,
'unlimited_hosts': False,
'max_hosts': 2,
'description': description
})
session.hostcollection.associate_host(hc_name, vm.hostname)
# Update the package by name
session.hostcollection.manage_packages(
hc_name, content_type='Package',
packages=FAKE_1_CUSTOM_PACKAGE_NAME,
action='update_all'
)
# Ensure package updated
packages = session.contenthost.search_package(vm.hostname, FAKE_2_CUSTOM_PACKAGE_NAME)
assert packages[0]['Installed Package'] == FAKE_2_CUSTOM_PACKAGE
# Delete content host
session.contenthost.delete(vm.hostname)
if not bz_bug_is_open(1662325):
assert not session.contenthost.search(vm.hostname)


@tier3
def test_positive_search_by_subscription_status(session, vm):
"""Register host into the system and search for it afterwards by
Expand Down

0 comments on commit c2e7c8d

Please sign in to comment.