https://github.com/libris/lxl_api_tests
Integration tests for Libris XL API
https://github.com/libris/lxl_api_tests
Last synced: 5 months ago
JSON representation
Integration tests for Libris XL API
- Host: GitHub
- URL: https://github.com/libris/lxl_api_tests
- Owner: libris
- License: apache-2.0
- Created: 2017-03-30T13:13:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-13T12:42:44.000Z (almost 2 years ago)
- Last Synced: 2024-09-14T04:19:35.423Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 119 KB
- Stars: 0
- Watchers: 17
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lxl_api_tests
This is a collection of integration tests for the LibrisXL API.
## Dependencies
`libssl-dev`
## Configuration
We use environment variables to configure which system to run the tests against as well as which system to use for
authorization. The following variables need to be set before executing the tests:
- `LXLTESTING_LOGIN_URL` - URL to the oauth server e.g. `https://login.libris.kb.se` or a local xl_auth instance.
- `LXLTESTING_USERNAME` and `LXLTESTING_PASSWORD` - user credentials for the oauth server.
- `LXLTESTING_OAUTH_CLIENT_ID` - client ID for an oauth client that is configured to redirect to the system under test.
- `LXLTESTING_ROOT_URL` - path to the Libris XL rest API, defaults to `http://libris.kb.se.localhost:5000`.
To be able to run without https against e.g. localhost, set:
`export OAUTHLIB_INSECURE_TRANSPORT=1`
## Running
```bash
# First install uv: https://github.com/astral-sh/uv
# Then run the tests:
$ LXLTESTING_LOGIN_URL=https://some.host LXLTESTING_USERNAME=username \
LXLTESTING_PASSWORD=password LXLTESTING_OAUTH_CLIENT_ID=client-id uv run pytest
```
Environment variables can also be kept in a run configuration for this project if running the tests in an IDE.