Skip to content

Commit

Permalink
Add test for BZ 2139834 (SatelliteQE#13699)
Browse files Browse the repository at this point in the history
* Add test for BZ 2139834

* Update test setup to create a discrete LCE, and publish/promote to there

* Update test setup to create a discrete LCE, and publish/promote to there

* Remove unnecessary publish
  • Loading branch information
sambible authored and shweta83 committed Apr 10, 2024
1 parent 73bb5d1 commit 6cb4158
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/foreman/cli/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -4023,6 +4023,48 @@ def test_positive_inc_update_no_lce(self, module_org, module_product, module_tar
content_view = module_target_sat.cli.ContentView.info({'id': content_view['id']})
assert '1.1' in [cvv_['version'] for cvv_ in content_view['versions']]

@pytest.mark.tier2
def test_version_info_by_lce(self, module_org, module_target_sat):
"""Hammer version info can be passed the lce id/name argument without error
:id: 6ab0c46c-c62a-488b-a30f-5500d6c7ec96
:steps:
1. Lookup CV version info passing the lce id as an argument
:expectedresults: LCE is able to be passed to version info command without error
:BZ: 2139834
:customerscenario: true
"""
content_view = module_target_sat.cli_factory.make_content_view(
{'organization-id': module_org.id}
)
module_target_sat.cli.ContentView.publish({'id': content_view['id']})
lce = module_target_sat.cli_factory.make_lifecycle_environment(
{'organization-id': module_org.id}
)
module_target_sat.cli.ContentView.version_promote(
{'id': content_view['id'], 'to-lifecycle-environment-id': lce['id']}
)
content_view = module_target_sat.cli.ContentView.version_info(
{
'id': content_view['id'],
'lifecycle-environment-id': lce['id'],
'organization-id': module_org.id,
}
)
assert content_view['version'] == '1.0'
content_view = module_target_sat.cli.ContentView.version_info(
{
'id': content_view['id'],
'lifecycle-environment': lce['name'],
'organization-id': module_org.id,
}
)
assert content_view['version'] == '1.0'


class TestContentViewFileRepo:
"""Specific tests for Content Views with File Repositories containing
Expand Down

0 comments on commit 6cb4158

Please sign in to comment.