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

[WIP] kea dhcp4 testing #706

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[WIP] kea dhcp4 testing #706

wants to merge 1 commit into from

Conversation

rcmadhankumar
Copy link
Contributor

No description provided.

@rcmadhankumar rcmadhankumar changed the title kea dhcp4 testing [WIP] kea dhcp4 testing Dec 17, 2024
Comment on lines +10 to +12
pytest.mark.parametrize("ctr_image", KEA_CONTAINERS)


Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
pytest.mark.parametrize("ctr_image", KEA_CONTAINERS)
@pytest.mark.parametrize("ctr_image", KEA_CONTAINERS)

Copy link
Collaborator

@dcermak dcermak left a comment

Choose a reason for hiding this comment

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

you need to add the marker to pyproject.toml and you have to update tests/test_metadata.py as well

cli_launcher.launch_container()

cli_con = cli_launcher.container_data.connection
client_log = cli_con.run_expect([0], "dhclient -v wlp0s20f3").stderr
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty certain this will not work universally. At least the github CI cloud workers and openQA workers don't have wifi

log_lines = kea_con.check_output("cat /tmp/kea-dhcp4.log")
pattern = r"DHCP4_LEASE_ALLOC .*?hwtype=1 ([\da-f:]+).*?lease ([\d.]+)"
match = re.search(pattern, log_lines)
if match:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should fail if there is no match

Copy link
Collaborator

@dcermak dcermak left a comment

Choose a reason for hiding this comment

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

And you need to add a kea test environment to tox.ini

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.

2 participants