Integration test suite that uses the openeo-python-client to test various use cases against an OpenEO backend.
To run the test suite against a certain OpenEO backend:
specify the backend base URL in environment variable
and run the tests.
export ENDPOINT=http://localhost:8080/ pytest
Most tests in the test suite require an authenticated connection to the back-end. The test suite setup/fixtures tries to do the right thing automatically:
- In an automated/Jenkins/CI context: use OIDC client credentials auth with a "service account".
Credentials should be provided through environment variables:
- Running locally as developer: using refresh tokens is supported.
Make sure you have valid refresh tokens in you environment.
If not, the device code flow will be used as fallback,
but with an extremely short poll timeout by default,
making it humanly impossible to actually complete the device code flow.
The timeout is short by default to avoid the confusion
with tests hanging inexplicably for minutes before failing.
Temporarily increase the timeout with env var
Pytest provides various options to run a subset or just a single test. Some examples (that can be combined):
select by substring of the name of a test with the
pytest -k test_health
run tests that do not involve batch jobs (which are decorated with
pytest -m "not batchjob"
Debugging and troubleshooting tips
tmp_pathfixture provides a fresh temporary folder for a test to work in. It is cleaned up automatically, except for the last 3 runs, so you can inspect generated files post-mortem. The temp folders are typically situated under
To disable pytest's default log/output capturing, to better see what is going on in "real time", add these options: