-
Notifications
You must be signed in to change notification settings - Fork 230
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: Run containers on ubuntu #1260
Draft
rjeffman
wants to merge
11
commits into
freeipa:master
Choose a base branch
from
rjeffman:run_containers_ubuntu
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9e4488b
to
f51cc11
Compare
0adc59f
to
95d9e03
Compare
f5579e2
to
1fde877
Compare
0b5418f
to
86ee000
Compare
4d4a62e
to
58e338e
Compare
/azp run CheckPR |
Azure Pipelines successfully started running 1 pipeline(s). |
To modify Azure tests and depend on shell scripts and pytest instead of molecule, the run-tests.sh script has been rewritten to depend on bash functions and on a bash script that prepare and start a testing container. This patch adds a new script, 'utils/setup_test_container.sh' that can be used to start a new container, using either podman or docker, based on the available ansible-freeipa images. The new container can then be used to run ansible-freeipa tests against it. Also the following files with bash functions were added, and are used by both scripts: utils/shansible: Functions to run playbooks in the container utils/shcontainer: Functions to setup/run a container utils/shfun: Generic shell helper functions (e.g.: log)
On some systems it is required or desired to run Ansible with a specific Python interpreter. This patch allows the selection of the Python binary to use for the pytest playbook tests by setting the environment variable IPA_PYTHON_PATH. Set it the the full path of the Python interpreter.
This patch removes 'molecule' as a dependency for tests, by using the scripts under `utils` to setup the environment. By not using molecule, we have more flexibility on using either docker or podman as the container engine, and makes it easy to reproduce the environment on different distros, allowing for a more consistent error reproduction off Azure.
As the scripts 'utils/run-tests.sh' and 'utils/setup_test_container.sh' use some scripts as function libraries, this change forces shellcheck to also verify those scripts.
58e338e
to
dff23af
Compare
dff23af
to
2cefdbf
Compare
1943e65
to
b2826dc
Compare
b2826dc
to
b973448
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a WIP to fix Azure tests.