Skip to content

Conversation

@ekohl
Copy link
Member

@ekohl ekohl commented Oct 28, 2025

To test out theforeman/smoker#46.

@ekohl ekohl force-pushed the test-with-smoker-for-content-tests branch from c03eec9 to a85f3aa Compare October 28, 2025 18:50
@ekohl
Copy link
Member Author

ekohl commented Oct 29, 2025

So first the actual change:

FAILED tests/test_content_api.py::test_foreman_yum_repository - requests.exceptions.ConnectionError: HTTPSConnectionPool(host='quadlet.example.com', port=443): Max retries exceeded with url: /pulp/content/c4b4f8a2-1b5f-414f-ad81-0ba9ad0bf5d7/Library/custom/167b0430-af1e-497f-89d9-baf4a31a9061/6ed36780-bc48-41b2-a1c0-ea9b741d4ea6//repodata/repomd.xml (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f2712c7bd70>: Failed to resolve 'quadlet.example.com' ([Errno -2] Name or service not known)"))
FAILED tests/test_content_api.py::test_foreman_file_repository - requests.exceptions.ConnectionError: HTTPSConnectionPool(host='quadlet.example.com', port=443): Max retries exceeded with url: /pulp/content/a4483945-5903-4ec6-93fa-dfd49fe00538/Library/custom/4cf48f15-e2f5-4fd1-868f-e50b2b7465e5/47c8095c-29bf-4e06-a86a-81844c5e775f//1.iso (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f27129f22a0>: Failed to resolve 'quadlet.example.com' ([Errno -2] Name or service not known)"))

As expected, it fails because we don't set up DNS for the Vagrant boxes. I didn't port over the ugly hack. But other than that the tests do pass.

Then there's another interesting bit that I also spotted locally:

tests/test_ping.py::test_ping
  /home/runner/smoker/tests/test_ping.py:13: UserWarning: Foreman doesn't have a status - issue https://projects.theforeman.org/issues/31545
    warnings.warn("Foreman doesn't have a status - issue https://projects.theforeman.org/issues/31545")

This is https://github.com/theforeman/smoker/blob/d2fd3f7cbe3591ebf0d1d1733ffc3edce8a2c36f/tests/test_ping.py#L9-L13 but https://projects.theforeman.org/issues/31545 has long been resolved so I'm not sure why we're seeing it.

I've debated using https://gist.github.com/ekohl/e487422d4aaad8ab176c19ec713b700a in the Vagrant setup to have working DNS.

@evgeni or others, any thoughts on how we want to proceed here?

@ekohl ekohl mentioned this pull request Oct 29, 2025
@ekohl
Copy link
Member Author

ekohl commented Oct 29, 2025

I've debated using https://gist.github.com/ekohl/e487422d4aaad8ab176c19ec713b700a in the Vagrant setup to have working DNS.

#269 does this and passes. Upside is no hacks, downside is that developers may not have the same environment.

@ekohl ekohl force-pushed the test-with-smoker-for-content-tests branch 2 times, most recently from 95ebcb2 to ad0becd Compare October 31, 2025 02:14
This makes sure the domain is set when the management domain is created,
which makes libvirt configure dnsmasq as a proper DNS server. This can
be used together with systemd-resolved on the host to look up guest IPs.

It also configures Vagrant in CI with DNS set up to utilize this.
@ekohl ekohl force-pushed the test-with-smoker-for-content-tests branch from ad0becd to c4c840f Compare November 12, 2025 17:23
@ekohl
Copy link
Member Author

ekohl commented Nov 17, 2025

I've split off the DNS changes commit into #305 so this commit becomes solely a commit to move tests over to smoker.

Comment on lines +9 to +10
smoker_url: https://github.com/ekohl/smoker
smoker_version: add-content-api-tests
Copy link
Member Author

Choose a reason for hiding this comment

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

@ekohl ekohl mentioned this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant