def test_positive_install_package_group(self): """Install a package group to a host remotely @Feature: Host - Package group @Assert: Package group was successfully installed """ Host.package_group_install({ u'groups': FAKE_0_CUSTOM_PACKAGE_GROUP_NAME, u'host-id': self.host['id'], }) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = self.client.run('rpm -q {0}'.format(package)) self.assertEqual(result.return_code, 0)
def test_positive_install_package_group(self): """Install a package group to a host remotely @id: 8c28c188-2903-44d1-ab1e-b74f6d6affcf @Assert: Package group was successfully installed @CaseLevel: System """ Host.package_group_install({ u'groups': FAKE_0_CUSTOM_PACKAGE_GROUP_NAME, u'host-id': self.host['id'], }) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = self.client.run('rpm -q {0}'.format(package)) self.assertEqual(result.return_code, 0)
def test_positive_remove_package_group(self): """Remove a package group from a host remotely @Feature: Host - Package group @Assert: Package group was successfully removed """ hammer_args = { u'groups': FAKE_0_CUSTOM_PACKAGE_GROUP_NAME, u'host-id': self.host['id'], } Host.package_group_install(hammer_args) Host.package_group_remove(hammer_args) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = self.client.run('rpm -q {0}'.format(package)) self.assertNotEqual(result.return_code, 0)
def test_positive_install_and_remove_package_group(self): """Install and remove a package group to a host remotely :id: ded20a89-cfd9-48d5-8829-739b1a4d4042 :expectedresults: Package group was successfully installed and removed :CaseLevel: System """ hammer_args = {'groups': FAKE_0_CUSTOM_PACKAGE_GROUP_NAME, 'host-id': self.host['id']} Host.package_group_install(hammer_args) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = self.client.run(f'rpm -q {package}') assert result.return_code == 0 Host.package_group_remove(hammer_args) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = self.client.run(f'rpm -q {package}') assert result.return_code != 0
def test_positive_remove_package_group(self): """Remove a package group from a host remotely @id: c80dbeff-93b4-4cd4-8fae-6a4d1bfc94f0 @Assert: Package group was successfully removed @CaseLevel: System """ hammer_args = { u'groups': FAKE_0_CUSTOM_PACKAGE_GROUP_NAME, u'host-id': self.host['id'], } Host.package_group_install(hammer_args) Host.package_group_remove(hammer_args) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = self.client.run('rpm -q {0}'.format(package)) self.assertNotEqual(result.return_code, 0)
def test_positive_install_and_remove_package_group(katello_agent_client): """Install and remove a package group to a host remotely :id: ded20a89-cfd9-48d5-8829-739b1a4d4042 :expectedresults: Package group was successfully installed and removed :CaseLevel: System """ client = katello_agent_client['client'] host_info = katello_agent_client['host_info'] hammer_args = { 'groups': FAKE_0_CUSTOM_PACKAGE_GROUP_NAME, 'host-id': host_info['id'] } Host.package_group_install(hammer_args) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = client.run(f'rpm -q {package}') assert result.status == 0 Host.package_group_remove(hammer_args) for package in FAKE_0_CUSTOM_PACKAGE_GROUP: result = client.run(f'rpm -q {package}') assert result.status != 0