diff --git a/tests/ci/README.md b/tests/ci/README.md index 1cce7e7f..c62c7fc0 100644 --- a/tests/ci/README.md +++ b/tests/ci/README.md @@ -1,23 +1,30 @@ -# The requirements.txt file is just a placeholder to show the installed packages in the utility container -https://github.com/validatedpatterns/utility-container/blob/main/requirements.txt - -# The ci will run pytest based on file pattern -pytest -lv test_.py --junit-xml .results/test_.xml - -# To run upstream tests locally -Set the env variables pointing to the clusters needed to run the tests on: -```VP_HUBCONFIG``` (```VP_SPOKECONFIG``` if applicable) pointing to the kubconfig of hub (and spoke) clusters -(all VP_* env var will be available inside the container) -```TARGET_CLUSTERGROUP``` if its different from the default (values-global.yaml main.clusterGroupName) -Test logs and junit-xml will be saved in ci/.results/ -Run from repo root +# CI Tests + +The requirements.txt file is just a placeholder to show the installed packages in the utility container: +[utility-container requirements.txt](https://github.com/validatedpatterns/utility-container/blob/main/requirements.txt) + +## The ci will run pytest based on file pattern + +pytest -lv test\_\.py --junit-xml .results/test\_\.xml + +## To run upstream tests locally + +Set the env variables pointing to the clusters needed to run the tests on:\ +`VP_HUBCONFIG` (`VP_SPOKECONFIG` if applicable) pointing to the kubconfig of hub (and spoke) clusters\ +(all VP\_\* env var will be available inside the container)\ +`TARGET_CLUSTERGROUP` if its different from the default (values-global.yaml main.clusterGroupName)\ +Test logs and junit-xml will be saved in ci/.results/\ +Run from root repository: + ```bash ./pattern.sh make run-ci-tests ``` -# Writing additonal tests -The openshift_dyn_client fixture will return a DynamicClient which can be used inside test functions. -It requires only an env variable param to use it as a kubeconfig. +## Writing additional tests + +The openshift_dyn_client fixture will return a DynamicClient which can be used inside test functions.\ +It requires only an env variable param to use it as a kubeconfig. + ```python @pytest.mark.parametrize( "openshift_dyn_client", @@ -25,9 +32,11 @@ It requires only an env variable param to use it as a kubeconfig. indirect=True, ) ``` -If your tests requires additional python packages, you might want to either run them fully locally in a venv or similar. -Or if you want to use the pattern framework (make/ansible wrappers) you need to use your own util container + +If your tests requires additional python packages, you might want to either run them fully locally in a venv or similar.\ +Or if you want to use the pattern framework (make/Ansible wrappers) you need to use your own util container + ```bash PATTERN_UTILITY_CONTAINER="your_utility container" ./pattern.sh make run-ci-tests -``` \ No newline at end of file +``` diff --git a/tests/ci/conftest.py b/tests/ci/conftest.py index 726fd1f0..12cc3c06 100644 --- a/tests/ci/conftest.py +++ b/tests/ci/conftest.py @@ -1 +1 @@ -from validatedpatterns_tests.interop.conftest_openshift import * +from validatedpatterns_tests.interop.conftest_openshift import * # noqa: F401,F403