Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for BZ 2139834 #13699

Merged
merged 5 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/foreman/cli/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -4023,6 +4023,34 @@ 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']})
content_view = module_target_sat.cli.ContentView.version_info(
{'id': content_view['id'], 'lifecycle-environment-id': 1}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the Library env is always ID = 1 but might be safe to also just do a search and make sure we are always getting the right ID instead of hard coding the ID. Also you could create a lifecycle env in the setup and use that ID / name.

)
assert len(content_view['versions']) == 1
content_view = module_target_sat.cli.ContentView.version_info(
{'id': content_view['id'], 'lifecycle-environment': 'Library'}
)
assert len(content_view['versions']) == 1


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