theforeman / theforeman/foremanctl

create more flexible fixtures

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tests
Dominant language
Python
Stars
27
Forks
47
Avg merge
1d 12h
Merged PRs (30d)
40

Description

          I don't know how far you want to take this, but I think you can even make the URL a parameter so it can be overridden
def yum_repository(product, organization, foremanapi, url='https://fixtures.pulpproject.org/rpm-no-comps/'):
    repo = foremanapi.create('repositories', {'name': str(uuid.uuid4()), 'product_id': product['id'], 'content_type': 'yum', 'url': url})

Originally posted by @ekohl in https://github.com/theforeman/foreman-quadlet/pull/43#discussion_r1829792152

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the yum_repository helper shown in the issue and inspect its existing fixture callers. Make the repository URL overridable while preserving the current default, then run the relevant test suite and confirm callers can supply a different URL without changing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.