Esempio n. 1
0
    def test_positive_remove_package(self):
        """Remove a package from a host remotely

        :id: 573dec11-8f14-411f-9e41-84426b0f23b5

        :expectedresults: Package was successfully removed

        :CaseLevel: System
        """
        self.client.run(f'yum install -y {FAKE_1_CUSTOM_PACKAGE}')
        Host.package_remove({'host-id': self.host['id'], 'packages': FAKE_1_CUSTOM_PACKAGE_NAME})
        result = self.client.run(f'rpm -q {FAKE_1_CUSTOM_PACKAGE_NAME}')
        assert result.return_code != 0
Esempio n. 2
0
    def test_positive_remove_package(self):
        """Remove a package from a host remotely

        @Feature: Host - Package

        @Assert: Package was successfully removed

        """
        self.client.download_install_rpm(FAKE_0_YUM_REPO,
                                         FAKE_0_CUSTOM_PACKAGE)
        Host.package_remove({
            u'host-id': self.host['id'],
            u'packages': FAKE_0_CUSTOM_PACKAGE_NAME,
        })
        result = self.client.run(
            'rpm -q {0}'.format(FAKE_0_CUSTOM_PACKAGE_NAME))
        self.assertNotEqual(result.return_code, 0)
Esempio n. 3
0
def test_positive_remove_package(katello_agent_client):
    """Remove a package from a host remotely

    :id: 573dec11-8f14-411f-9e41-84426b0f23b5

    :expectedresults: Package was successfully removed

    :CaseLevel: System
    """
    client = katello_agent_client['client']
    host_info = katello_agent_client['host_info']
    client.run(f'yum install -y {FAKE_1_CUSTOM_PACKAGE}')
    Host.package_remove({
        'host-id': host_info['id'],
        'packages': FAKE_1_CUSTOM_PACKAGE_NAME
    })
    result = client.run(f'rpm -q {FAKE_1_CUSTOM_PACKAGE_NAME}')
    assert result.status != 0
Esempio n. 4
0
    def test_positive_remove_package(self):
        """Remove a package from a host remotely

        @id: 573dec11-8f14-411f-9e41-84426b0f23b5

        @Assert: Package was successfully removed


        @CaseLevel: System
        """
        self.client.download_install_rpm(FAKE_0_YUM_REPO,
                                         FAKE_0_CUSTOM_PACKAGE)
        Host.package_remove({
            u'host-id': self.host['id'],
            u'packages': FAKE_0_CUSTOM_PACKAGE_NAME,
        })
        result = self.client.run(
            'rpm -q {0}'.format(FAKE_0_CUSTOM_PACKAGE_NAME))
        self.assertNotEqual(result.return_code, 0)
Esempio n. 5
0
    def test_positive_remove_package(self):
        """Remove a package from a host remotely

        @Feature: Host - Package

        @Assert: Package was successfully removed

        """
        self.client.download_install_rpm(
            FAKE_0_YUM_REPO,
            FAKE_0_CUSTOM_PACKAGE
        )
        Host.package_remove({
            u'host-id': self.host['id'],
            u'packages': FAKE_0_CUSTOM_PACKAGE_NAME,
        })
        result = self.client.run(
            'rpm -q {0}'.format(FAKE_0_CUSTOM_PACKAGE_NAME)
        )
        self.assertNotEqual(result.return_code, 0)
Esempio n. 6
0
    def test_positive_remove_package(self):
        """Remove a package from a host remotely

        @id: 573dec11-8f14-411f-9e41-84426b0f23b5

        @Assert: Package was successfully removed


        @CaseLevel: System
        """
        self.client.download_install_rpm(
            FAKE_0_YUM_REPO,
            FAKE_0_CUSTOM_PACKAGE
        )
        Host.package_remove({
            u'host-id': self.host['id'],
            u'packages': FAKE_0_CUSTOM_PACKAGE_NAME,
        })
        result = self.client.run(
            'rpm -q {0}'.format(FAKE_0_CUSTOM_PACKAGE_NAME)
        )
        self.assertNotEqual(result.return_code, 0)