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 default content type as yum for make_repository helper #13196

Merged

Conversation

Gauravtalreja1
Copy link
Collaborator

@Gauravtalreja1 Gauravtalreja1 commented Nov 28, 2023

Problem Statement

Changes introduced in #11544 removed the usage of old cli.factory in favor of new cli_factory helpers. And, I've observed a few failures related default content_type missing from hammer repository create command used by make_repository helper, and it was present earlier and missing in cli_factory method.

robottelo.exceptions.CLIFactoryError: Failed to create Repository with data:
{ 'http-proxy-policy': 'none',
  'name': 'sissapUBCf',
  'organization-id': 3,
  'product-id': '1',
  'url': 'http://testserver.example.com:50123/fake_yum0'}
Command "repository create" finished with status 64
stderr contains:
Could not create the repository:
  Missing arguments for '--content-type'.

Solution

Add content_type=yum as default in make_repository helper of cli_factory

Additional Info

#11544 cherrypicking was failed for 6.14.z or older, but it was merged before branching, so this will require cherrypicking to 6.15.z

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
@Gauravtalreja1 Gauravtalreja1 added Easy Fix :) Easiest Fix to review and quick merge request. CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.15.z Introduced in or relating directly to Satellite 6.15 labels Nov 28, 2023
@Gauravtalreja1 Gauravtalreja1 self-assigned this Nov 28, 2023
@Gauravtalreja1 Gauravtalreja1 requested a review from a team as a code owner November 28, 2023 13:18
@Gauravtalreja1
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_logging.py::test_positive_logging_from_pulp3 tests/foreman/cli/test_http_proxy.py::test_positive_assign_http_proxy_to_products

@omkarkhatavkar omkarkhatavkar merged commit c8429aa into SatelliteQE:master Nov 29, 2023
10 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 29, 2023
Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
(cherry picked from commit c8429aa)
@Gauravtalreja1 Gauravtalreja1 deleted the fix-make-repo-content-type branch November 29, 2023 12:46
Gauravtalreja1 added a commit that referenced this pull request Nov 29, 2023
…13204)

Add default content type as yum for make_repository helper (#13196)

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
(cherry picked from commit c8429aa)

Co-authored-by: Gaurav Talreja <gtalreja@redhat.com>
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Nov 30, 2023
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Nov 30, 2023
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Nov 30, 2023
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Nov 30, 2023
Gauravtalreja1 added a commit that referenced this pull request Nov 30, 2023
* Remove cli.factory dependencies from the repo (#11544)

Remove cli_factory

* Add default content type as yum for make_repository helper (#13196)

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>

---------

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
Co-authored-by: Shweta Singh <shwsingh@redhat.com>
Co-authored-by: Gaurav Talreja <gtalreja@redhat.com>
Gauravtalreja1 added a commit that referenced this pull request Nov 30, 2023
* Remove cli.factory dependencies from the repo (#11544)

Remove cli_factory

* Add default content type as yum for make_repository helper (#13196)

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>

---------

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
Co-authored-by: Shweta Singh <shwsingh@redhat.com>
Co-authored-by: Gaurav Talreja <gtalreja@redhat.com>
Gauravtalreja1 added a commit that referenced this pull request Nov 30, 2023
* Remove cli.factory dependencies from the repo (#11544)

Remove cli_factory

* Add default content type as yum for make_repository helper (#13196)

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>

---------

Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
Co-authored-by: Shweta Singh <shwsingh@redhat.com>
Co-authored-by: Gaurav Talreja <gtalreja@redhat.com>
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches Easy Fix :) Easiest Fix to review and quick merge request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants