robottelo icon indicating copy to clipboard operation
robottelo copied to clipboard

FIX UI Issue : tests.foreman.ui.test_lifecycleenvironment.test_positive_add_puppet_module

Open omkarkhatavkar opened this issue 5 years ago • 0 comments

Error Message AssertionError: assert 'There are no... is selected.' == 'httpd' - There are no Puppet Modules that match the criteria. Please make sure a Content View is selected. + httpd Stacktrace session = <airgun.session.Session object at 0x7f71c2d9a898> module_org = nailgun.entities.Organization(compute_resource=[], config_template=[nailgun.entities.ConfigTemplate(id=3), nailgun.ent...fault_content_view=nailgun.entities.ContentView(id=756), library=nailgun.entities.LifecycleEnvironment(id=598), id=549)

@tier2
@upgrade
def test_positive_add_puppet_module(session, module_org):
    """Promote content view with puppet module to a new environment

    :id: 12bed99d-8f96-48ca-843a-b77e123e8e2e

    :steps:
        1. Create Product/puppet repo and sync it
        2. Create CV and add puppet module from created repo
        3. Publish and promote CV to new environment

    :expectedresults: Puppet modules can be listed successfully from lifecycle
        environment interface

    :BZ: 1408264

    :CaseLevel: Integration
    """
    puppet_module = 'httpd'
    product = entities.Product(organization=module_org).create()
    repo = entities.Repository(
        product=product,
        content_type=REPO_TYPE['puppet'],
        url=FAKE_0_PUPPET_REPO
    ).create()
    repo.sync()
    lce = entities.LifecycleEnvironment(organization=module_org).create()
    cv = entities.ContentView(organization=module_org).create()
    with session:
        session.contentview.add_puppet_module(cv.name, puppet_module)
        session.contentview.publish(cv.name)
        result = session.contentview.promote(cv.name, 'Version 1.0', lce.name)
        assert 'Promoted to {}'.format(lce.name) in result['Status']
        lce = session.lifecycleenvironment.read(lce.name)
      assert lce['puppet_modules']['table'][0]['Name'] == puppet_module

E AssertionError: assert 'There are no... is selected.' == 'httpd' E - There are no Puppet Modules that match the criteria. Please make sure a Content View is selected. E + httpd

tests/foreman/ui/test_lifecycleenvironment.py:152: AssertionError

Resolution Adding read method on puppet modules based on CV filter will solve this issue.

omkarkhatavkar avatar Jul 23 '19 07:07 omkarkhatavkar