From 38d3e1d48ec7a657fb893f668400a583fdb31127 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Thu, 16 Feb 2023 10:58:23 +0100 Subject: test: add howto setup integration tests Signed-off-by: Alice Frosi --- tests/integration/README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/integration/README.md (limited to 'tests/integration/README.md') diff --git a/tests/integration/README.md b/tests/integration/README.md new file mode 100644 index 0000000..cc99ead --- /dev/null +++ b/tests/integration/README.md @@ -0,0 +1,47 @@ +# Howto setup and run the integration tests + +The integration tests require access to podman socket activation (root) as +seitan requires high privileges. + +1. Enable podman: +```bash +$ sudo systemctl enable podman +$ sudo systemctl startpodman +``` + +2. Build the container images needed for the tests: For sake of simplicity, the + build requires root to be ready to be used. Otherwise, you can build using +rootless, and then either pushing them to a registry or loading them into the +image storage of root podman. +```bash +$ build-test-images +``` + +3. Create a python virtual environment to install the python packages (this is + needed only the first time): +```bash +$ python -m venv venv +$ ls venv/ +bin include lib lib64 pyvenv.cfg +``` + +4. Enable the virtual environment: +```bash +$ source venv/bin/activate +(venv) $ +``` + +5. Install the required python packages: +```bash +(venv) $ pip install -r tests/integration/requirements.txt +``` + +6. Run the tests: +``` +(venv) $ sudo -E PATH=$PATH make test-integration +``` + +7. Exit from the virtual environment: +```bash +(venv) $ deactivate +``` -- cgit v1.2.3