- Oct 11, 2024
-
-
Thomas Woerner authored
The new generate_test_data.yml is creating the test data with ansible.builtin.shell and is not calling shell scripts any more. The generation in the yml file and also the set_fact calls make sure that the test data is used.
-
Rafael Guterres Jeffman authored
Merge pull request #1299 from t-woerner/pylint_github_workflow_disable_too-many-positional-arguments pylint gihub workflow: Disable too-many-positional-arguments
-
Thomas Woerner authored
This change disables the too-many-positional-arguments message for the pylint github workflow.
-
- Oct 09, 2024
-
-
Rafael Guterres Jeffman authored
New infra image start
-
- Oct 02, 2024
-
-
Thomas Woerner authored
This inventory file is usable for the containers started with infra/image/start.sh.
-
Thomas Woerner authored
This makes sure that the service is not failing on already applied modifications.
-
Thomas Woerner authored
The help has been fixed for the -s option and the comments about how to start the container later on has been removed as there will be a script that is handling this..
-
Thomas Woerner authored
This reduces the number of started services in the container. The fixipaip.service needed to be adapted to ensure that the service is started properly. The dockerfiles have been adapted for this change also.
-
Thomas Woerner authored
This change also removed ansible_python_interpreter setting in the inventory as the interpreter should be discovered by ansible for the distributions. The dockerfiles have been adapted to not force the installation of python3 for CentOS-Stream 8, 9 and 10.
-
Thomas Woerner authored
This removes a lot of duplicate code from the script.
-
Thomas Woerner authored
The script will try to get the latest image from quay to start it. With the -l option it will try to use a local image first. This is for example useful to test changes in the images build script locally. This also adds infra/image/shcontainer. Some of the content is copied from utils/shcontainer.
-
- Aug 07, 2024
-
-
f-trivino authored
Infra image system services dns and kinit
-
Thomas Woerner authored
The kinit call have been missing the principal.
-
Thomas Woerner authored
The DNS forwarder is set while deploying the IPA server. This forwarder might not be correct later on. The old /etc/resolv.conf is copied to /etc/resolv.conf.fixnet by the fixnet service and later on the fixipaip service is trying to get the nameserver from the copied file. If the retrieval failed of if the namesever is 127.0.0.1, then the nameserver will be set to 8.8.8.8. After fixing the IP addresses for the forward and reverse zone, also the forwarder is set for the dnsserver "${HOSTNAME}".
-
f-trivino authored
infra/image/system-services: Enhance checks, also fix reverse zone
-
Thomas Woerner authored
Checks for IPv4 addresses have been added and reverse zone handling for fixipaip.sh The services are logging StandardOutput and StandardError to journal now.
-
- Aug 02, 2024
-
-
f-trivino authored
Run tests with podman and ubuntu 20.04
-
Thomas Woerner authored
Most of the content has been moved to the new function _run_playbook to reduce the traceback output in the case of a test failure.
-
Rafael Guterres Jeffman authored
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.
-
Rafael Guterres Jeffman authored
-
Rafael Guterres Jeffman authored
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.
-
Rafael Guterres Jeffman authored
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)
-
Thomas Woerner authored
README-host.md: correction of managedby_host description
-
- Jul 31, 2024
-
-
f-trivino authored
New image builder without molecule using podman
-
Thomas Woerner authored
If the deployment was enabled and failed, the script still continued without failing. If podman was missing it failed without a proper error. The script now fails and does not enable the services and also does not commit after the failed deployment. Also is fails if podman is missing.
-
Rafael Guterres Jeffman authored
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.
-
Rafael Guterres Jeffman authored
-
Rafael Guterres Jeffman authored
As we do not use molecule features, using a Dockerfile and the ansible-freeipa deployment roles is enough to create the container testing images. This patch removes the usage of molecule in favor of the custom ansible-freeipa image building script, which allow us to have a similar process for creating images both on the ustream CI, or on a developer's environment. Also, CentOS 7 is removed from the build script, as it in not possible to run CentOS 7 containers with current versions of systemd.
-
Rafael Guterres Jeffman authored
This patch modifies the image building script by adding: - An usage message. - An option "-I" to NOT install IPA to the generated container. - An opiton "-c NAME" to both set the name and use an existing container to ONLY install IPA. - Rename "scenario" to "DISTRO" as "scenario" should be used for the container scenario usage, rather than the distro (I'll change the name also in the Azure scripts) - Use 'log' (from shlog) to print messages.
-
Rafael Guterres Jeffman authored
Add two shell libaries with utilities to write shell scripts. The 'utils/shlog' file provides macro names for ANSI escape sequences to control color output on terminals, a 'log' functions with pre-defined behavior for ERROR, WARN, DEBUG, INFO and SUCCESS level messages, and the 'quiet' function which executes a command and hides its output. The 'utils/shfun' file provides an interruptinon handler for SIGINT, and the following functions: - run_if_exists: run a command if it is available - cleanup: cleanup environment, possibly stopping a container and a Python virtual environment. - start_virtual_environmnt: initiates a Python virtual environment - in_python_virtualenv: test if the script is running inside a Python virtual environment - die: abort the script with an error message end exit code 1 New files: - utils/shlog - utils/shfun
-
Thomas Woerner authored
The new infra/image/build.sh script is used instead of molecule.
-
Thomas Woerner authored
The new image builder is not using molecule and uses podman directly for the generation of the ansible-test images. Two additional services are installed to simplify the use of the container in the test: - fixnet.service uses /root/fixnet.sh to fix IP address of the server in /etc/hosts and to set localhost as the nameserver. This service is executed before IPA is started. This eliminates the need to restart the IPA server after the container has been started and the IPs have been fixed. - fixipaip.service uses /root/fixipaip.sh to fix the IP address of the IPA dnsrecords of server and ipa-ca. With these services it is now only needed to wait till all services in the container are started. There is no need to restart the IPA server anymore. Simply use something like this before starting the tests: while [ -n "$(podman exec ansible-test systemctl list-jobs | grep -vi 'no jobs running')" ]; do echo "waiting.."; sleep 5; done New files - infra/image/build.sh - infra/image/dockerfile/c8s - infra/image/dockerfile/c9s - infra/image/dockerfile/c10s - infra/image/dockerfile/fedora-latest - infra/image/dockerfile/fedora-rawhide - infra/image/inventory - infra/image/system-service/fixipaip.service - infra/image/system-service/fixipaip.sh - infra/image/system-service/fixnet.service - infra/image/system-service/fixnet.sh
-
- Jul 30, 2024
-
-
Kees Bakker authored
-
- Jul 22, 2024
-
-
Rafael Guterres Jeffman authored
Fix multi user tests
-
Thomas Woerner authored
The tests test_users_present.yml and test_users_absent.yml has been merged into test_users_present_absent.yml to fix the independent test order execution. The test test_users_present_slice.yml has been renamed to test_users_present_absent_slice.yml. Both tests are cleaning up possible exiting entries before running the tests and are verifying the present and absent task result.
-
Rafael Guterres Jeffman authored
tests/service/test_services_present.yml: Add missing cleanup
-
- Jul 20, 2024
-
-
Rafael Guterres Jeffman authored
Truncate stdout and stderr in upstream test log
-
- Jul 19, 2024
-
-
Thomas Woerner authored
The cleanup of the test services and hosts have been missing, which could lead to a test failure.
-
- Jul 17, 2024
-
-
Thomas Woerner authored
Truncate stdout and stderr in the way that it hopefully shows all important information. At least 15 lines of stdout (Ansible tasks) and remaining from stderr to fill up to maxlen size. The test log mostly only showed lines from stderr as the log was a concatenation of stdout and stderr and only the last 2500 chars of this have been used. This was hiding the test result from stdout and failures have not beeen visible.
-
- Jul 01, 2024
-
-
Rafael Guterres Jeffman authored
Documentation fixes for issues found by ansible-test part of ansible-core 2.17.1
-