diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-02-16 10:58:23 +0100 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-02-16 10:58:23 +0100 |
commit | 38d3e1d48ec7a657fb893f668400a583fdb31127 (patch) | |
tree | faaedacf23b5fb4de8f66498da6dd96af07cf2ff | |
parent | fe5c40a83620a870e32777b779fbbd2833d4db13 (diff) | |
download | seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.tar seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.tar.gz seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.tar.bz2 seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.tar.lz seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.tar.xz seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.tar.zst seitan-38d3e1d48ec7a657fb893f668400a583fdb31127.zip |
test: add howto setup integration tests
Signed-off-by: Alice Frosi <afrosi@redhat.com>
-rw-r--r-- | tests/integration/README.md | 47 | ||||
-rw-r--r-- | tests/integration/requirements.txt | 13 |
2 files changed, 60 insertions, 0 deletions
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 +``` diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt new file mode 100644 index 0000000..3126efe --- /dev/null +++ b/tests/integration/requirements.txt @@ -0,0 +1,13 @@ +attrs==22.2.0 +certifi==2022.12.7 +charset-normalizer==3.0.1 +idna==3.4 +iniconfig==2.0.0 +packaging==23.0 +pluggy==1.0.0 +podman==4.4.0 +pytest==7.2.1 +pyxdg==0.28 +requests==2.28.2 +urllib3==1.26.14 +waiting==1.4.1 |