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

Container testing framework #298

Merged
merged 6 commits into from
Jul 10, 2024
Merged

Conversation

cidrblock
Copy link
Contributor

@cidrblock cidrblock commented Jul 9, 2024

This PR lays the groundwork for container testing with pytest.

It has been implemented in such a manner the container tests will not currently run without specific pytest flags, this was done to avoid and impact to the current setup.

The container is started udring session start and stopped at session finish, with a fixture available to run commands in the container.

Container specific tests will be marked:

@pytest.mark.container()

Usage example:

pytest --only-container --image-name ghcr.io/ansible/community-ansible-dev-tools

Only a single sample test is in place now.

Closes #276

@github-actions github-actions bot added bug Something isn't working minor labels Jul 9, 2024
@cidrblock cidrblock added enhancement New feature or request and removed bug Something isn't working minor labels Jul 10, 2024
@cidrblock cidrblock marked this pull request as ready for review July 10, 2024 14:14
@cidrblock cidrblock requested a review from a team as a code owner July 10, 2024 14:14
@cidrblock cidrblock requested review from ssbarnea, Qalthos, shatakshiiii, NilashishC and alisonlhart and removed request for a team July 10, 2024 14:14
@alisonlhart
Copy link
Contributor

Tested locally - working!

@cidrblock cidrblock merged commit 81d5a00 into ansible:main Jul 10, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants