Validate the deployment (optional)
After the post-install setup, your instance is ready to use, and most people can stop there.
This page is for the times when you need to prove the deployment is really working well. The geo-deploy is a test suite that tests all GEO Knowledge Hub API endpoints, covering Knowledge Packages, Knowledge Resources, drafts and file uploads, communities, search and DOI.
Prerequisites
Section titled “Prerequisites”You need a running instance to use the geo-deploy, so finish the quickstart first. You also need to have applied the post-install setup, so everything required (i.e., vocabularies, roles) are ready and available.
On your own machine, the only requirement is Python 3.12+ and uv.
1. Get the tool
Section titled “1. Get the tool”To start, first clone the repository:
git clone https://github.com/geo-knowledge-hub/geo-deploy.gitThen, move to it:
cd geo-deploy2. Install the dependencies
Section titled “2. Install the dependencies”Now, on the directory, let’s install the geo-deploy and its dependencies using uv:
uv sync3. Create an API token
Section titled “3. Create an API token”Most of the tests write to the API, so they need to authenticate as a valid user. To let the geo-deploy authenticate, you need to provide valid access token for the tool.
For this, open your instance in a browser, click your avatar in the top right corner and go to Settings. Then, on the left sidebar, click on Applications. Under Personal access tokens, click New token, give it a name such as geo-deploy, and select all the available scopes. When you click Create, the token is shown once and never again, so copy it before leaving the page.
4. Point the suite at your instance
Section titled “4. Point the suite at your instance”The suite reads its settings from a .env file in the project folder. To create one, we can start from the example file provided in the repository:
cp .env.example .envThen open .env and fill in your values:
GEO_BASE_URL=https://invenio.local:8080GEO_API_TOKEN=<your token>GEO_NO_VERIFY_TLS=trueThe GEO_BASE_URL is the root URL of your instance, written without a trailing slash. The GEO_API_TOKEN is the token you created in the previous step. It is also possible to define the GEO_NO_VERIFY_TLS, which enable or disable the verification of HTTPS certificate.
5. Run the suite
Section titled “5. Run the suite”To run everything:
uv run pytest tests/ -vThe tests are split in two groups, and you can run them separately. The UI tests check that the public pages answer, and they work without a token:
uv run pytest tests/ui/ -vThe API tests exercise the endpoints and do require a valid token:
uv run pytest tests/api/ -vCheck a single feature
Section titled “Check a single feature”When you are chasing one specific problem, running the whole suite is slower than it needs to be. Each feature has its own test, so you can run just the one you care about:
| Feature | Command |
|---|---|
| Knowledge Packages | uv run pytest tests/api/test_packages.py -v |
| Knowledge Resources | uv run pytest tests/api/test_resources.py -v |
| Drafts and files | uv run pytest tests/api/test_drafts.py -v |
| Communities | uv run pytest tests/api/test_communities.py -v |
| Search, including spatial | uv run pytest tests/api/test_search.py -v |
| DOI | uv run pytest tests/api/test_doi.py -v |
| Public UI | uv run pytest tests/ui/ -v |
Next steps
Section titled “Next steps”1) Try the REST API examples against your instance.
2) Review the parameters reference to fine-tune resource limits, autoscaling, and bundled-services credentials.