Closed Rebits closed 2 years ago
In order to test Wazuh-QA test with the version of Python (3.10.4) installed in the node and instances deployed with the pipeline Deployer it must replace the following marker in the jq
and pytest
package:
jq==1.1.2 ; platform_system == "Linux" or platform_system == "Darwin"
Replace by:
jq==1.1.2 ; (platform_system == "Linux" or platform_system == "Darwin") and python_version <= "3.9"
jq==1.2.2 ; python_version >= "3.10"
And
pytest==6.2.2
Replace by:
pytest==6.2.2 ; python_version <= "3.9"
pytest==7.1.2 ; python_version >= "3.10"
python3 -m pip install -r requirements.txt
WARNING: There was an error checking the latest version of pip.
python3 -m pip install --upgrade pip
After upgrading pip the requirements.txt
was installed again and the output was:
python3 setup.py install
python3 setup.py install --user
python3 -m pytest integration/
python3 -m pip install --upgrade pytest
In order to use a pytest version that work with python 3.10 in the requirements.txt file it must be replaced the following line:
pytest==6.2.2
By
pytest==6.2.2 ; python_version <= "3.9"
pytest==7.1.2 ; python_version >= "3.10"
python3 -m pytest integration/
In the instance deployed Python 3.10.4
is not set as default python.
sudo update-alternatives --config python3
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements.txt
Using sudo python3 -m pip install -r requirements.txt
the problem will be solved.
python3 deps/wazuh_testing/setup.py install
Using python3 deps/wazuh_testing/setup.py install --user
the problem will be solved.
python3 -m pytest integration/
ImportError while loading conftest '/home/qa/wazuh-qa/tests/integration/conftest.py'.
integration/conftest.py:17: in <module>
import wazuh_testing.tools.configuration as conf
E ModuleNotFoundError: No module named 'wazuh_testing'
python3 -m pip install -r requirements.txt
Description
New nodes and instances are provided with
python3.10.4
. However, the current requirement file fails to installjq
:Full error: output.zip
It is required to include some logic to install libraries depending on the python version. We could use the
python_version
environment makers