SatelliteQE / robottelo

Robottelo is a test suite that exercises The Foreman.
GNU General Public License v3.0
61 stars 112 forks source link

AssertionError: 4 != 0 tests/upgrades/test_errata.py:303: AssertionError #6829

Closed vijay8451 closed 5 years ago

vijay8451 commented 5 years ago

Error Message

AssertionError: 4 != 0

Stacktrace

self =

@post_upgrade
def test_post_scenario_errata_count_installtion(self):
    """Post-upgrade scenario that installs the package on pre-upgrade
    client remotely and then verifies if the package installed.

    :id: 88fd28e6-b4df-46c0-91d6-784859fd1c21

    :steps:

        1. Recovered pre_upgrade data for post_upgrade verification
        2. Verifying errata count has not changed on satellite
        3. Update Katello-agent and Restart goferd
        4. Verifying the errata_ids
        5. Verifying installation errata passes successfully
        6. Verifying that package installation passed successfully by remote docker exec

    :expectedresults:
        1. errata count, erratum list should same after satellite upgrade
        2. Installation of errata should be pass successfully
     """
    entity_data = get_entity_data(self.__class__.__name__)
    client = entity_data.get('rhel_client')
    client_container_id = list(client.values())[0]
    custom_repo_id = entity_data.get('custom_repo_id')
    product_id = entity_data.get('product_id')
    conten_view_id = entity_data.get('conten_view_id')
    product = entities.Product(id=product_id).read()
    content_view = entities.ContentView(id=conten_view_id).read()
    custom_yum_repo = entities.Repository(id=custom_repo_id).read()
    activation_key = entity_data.get('activation_key')
    host = entities.Host().search(query={
        'search': 'activation_key={0}'.format(activation_key)})[0]

    applicable_errata_count = host.content_facet_attributes[
        'errata_counts']['total']
    tools_repo, rhel_repo = self._create_custom_rhel_tools_repos(product)
    product.sync()
    for repo in (tools_repo, rhel_repo):
        content_view.repository.append(repo)
    content_view = content_view.update(['repository'])
    content_view.publish()
    content_view = content_view.read()

    self._install_or_update_package(client_container_id,
                                    "katello-agent",
                                    update=True)
    self._run_goferd(client_container_id)
    self.assertGreater(applicable_errata_count, 1)

    erratum_list = entities.Errata(repository=custom_yum_repo).search(query={
        'order': 'updated ASC',
        'per_page': 1000,
    })
    errata_ids = [errata.errata_id for errata in erratum_list]
    self.assertEqual(sorted(errata_ids), sorted(FAKE_9_YUM_ERRATUM))

    for errata in FAKE_9_YUM_ERRATUM:
        host.errata_apply(data={'errata_ids': [errata]})
        applicable_errata_count -= 1
    self.assertEqual(
        host.content_facet_attributes['errata_counts']['total'],
      0

) E AssertionError: 4 != 0

tests/upgrades/test_errata.py:303: AssertionError

ntkathole commented 5 years ago

duplicat eof #6814