Skip to content

Add tests and update parameters for templates feature - #706

Open
shubhamsg199 wants to merge 2 commits into
theforeman:masterfrom
shubhamsg199:fix-templates-params-followup
Open

Add tests and update parameters for templates feature#706
shubhamsg199 wants to merge 2 commits into
theforeman:masterfrom
shubhamsg199:fix-templates-params-followup

Conversation

@shubhamsg199

Copy link
Copy Markdown
Contributor

Why are you introducing these changes? (Problem description, related links)

This is a followup PR for #519

What are the changes introduced in this pull request?

Dependency: Added changes from https://github.com/theforeman/foremanctl/pull/703/changes for the tests to work, can be easily rebased once it is merged

@shubhamsg199 shubhamsg199 self-assigned this Jul 28, 2026
@shubhamsg199
shubhamsg199 force-pushed the fix-templates-params-followup branch from c0e2f8c to 51f5330 Compare July 28, 2026 16:26

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for picking up the parameter changes. IMHO this PR is doing 2 things: change parameters and add tests. The PR title should reflect that. On git commits I'd recommend separating it into 2 separate commits.

Comment thread docs/user/parameters.md
Comment thread src/playbooks/_foreman_proxy/metadata.obsah.yaml Outdated
@shubhamsg199
shubhamsg199 force-pushed the fix-templates-params-followup branch from 51f5330 to 8b6fde6 Compare July 28, 2026 17:11
@shubhamsg199 shubhamsg199 changed the title Add tests for templates feature Add tests and update parameters for templates feature Jul 28, 2026
@shubhamsg199
shubhamsg199 force-pushed the fix-templates-params-followup branch from 8b6fde6 to a77dd82 Compare July 28, 2026 17:40
Comment thread tests/feature/foreman-proxy/base_test.py Outdated
Comment thread tests/feature/foreman-proxy/base_test.py Outdated
Comment thread src/roles/foreman_proxy/templates/settings.d/templates.yml.j2 Outdated
Comment thread tests/conftest.py
Signed-off-by: Shubham Ganar <shubhamsg123m@gmail.com>
@shubhamsg199
shubhamsg199 force-pushed the fix-templates-params-followup branch from d1a6bea to a522d6a Compare July 29, 2026 10:13
Signed-off-by: Shubham Ganar <shubhamsg123m@gmail.com>
@shubhamsg199
shubhamsg199 force-pushed the fix-templates-params-followup branch from a522d6a to 31f7aa9 Compare July 29, 2026 10:27
jeremylenz added a commit to jeremylenz/foremanctl that referenced this pull request Jul 30, 2026
- Assert templates feature present when registration enabled (dependency)
- Add skipped test for registration endpoint (awaits PR theforeman#706 curl fix)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread tests/conftest.py
Comment on lines +135 to +137
# this intentionally uses get_paramiko_host directly, as we want the cert of the quadlet box
# not the one "server" points at, as that can be the proxy
quadlet = get_paramiko_host('quadlet')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hard-coding quadlet here makes me uneasy. This assumes that there is a box named quadlet that is present, something which is not guaranteed on all foremanctl setups. (for instance, if you use forge deploy-dev --target-host localhost.) Maybe we could add a new --quadlet-hostname CLI option (defaulting to "quadlet")?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMHO (but this is more for #703) the current --server-hostname should be --target-hostname and --server-hostname should be what you describe as --quadlet-hostname here

But that's probably a bigger task that should be tackled outside of #703

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, can you even run those tests against a dev setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants