This repository contains ODH / Red Hat Openshift AI (RHOAI) tests.
The tests are written in Python and use pytest as a test framework.
Please follow the Contributing Guide
Install uv
These tests can be executed against arbitrary cluster with ODH / RHOAI installed.
You can log in into such cluster via:
oc login -u user -p password
Or by setting KUBECONFIG
variable:
KUBECONFIG=<kubeconfig file>
or by saving the kubeconfig file under ~/.kube/config
uv run pytest
To see optional CLI arguments run:
uv run pytest --help
CLI arguments can be passed to pytest by setting them in pytest.ini.
You can either use the default pytest.ini file and pass CLI arguments or create a custom one.
For example, add the below under the addopts
section:
--ci-s3-bucket-name=name
--ci-s3-bucket-endpoint=endpoint-path
--ci-s3-bucket-region=region
Then pass the path to the custom pytest.ini file to pytest:
uv run pytest -c custom-pytest.ini
uv run pytest -k test_name
Bt default, RHOAI distribution is set.
To run on ODH, pass --tc=distribution:upstream
to pytest.
To skip running tests which have open bugs, pytest_jira plugin is used.
To run tests with jira integration, you need to set PYTEST_JIRA_URL
and PYTEST_JIRA_TOKEN
environment variables.
To make a test with jira marker, add: @pytest.mark.jira(jira_id="RHOAIENG-0000", run=False)
to the test.