Backend-less testing API, simulating an openEO backend. For testing purposes during openEO client development.
Based on the openEO backend driver for Google Earth Engine: openeo-earthengine-driver on GitHub.
This API implements openEO API version 1.2.0.
The driver is written in Node.js and requires a Node.js version between v20.0.0 and v23.11.1. Install Node.js and npm according to the official documentation of each software package.
Afterwards, either download the files in this repository or clone it. Run npm install to install the dependencies.
There are several important configuration options in the file config.json:
hostname: The address of the server. For local deployments usually127.0.0.1, for public instances the IP or domain name of the server, e.g.test.openeo.example.port: The port the HTTP instance of the openEO GEE driver is running on.ssl: Configuration to enable HTTPS (secured HTTP with SSL).port: The port the HTTPS (secured) instance of the openEO GEE driver is running on.key: If you want to create an HTTPS server, pass in a private key. Otherwise set tonull.certificate: If you want to create an HTTPS server, pass in a PEM-encoded certificate. Otherwise set tonull.
To disable certain endpoints, edit the following flags in the config.json file:
- Batch-Jobs
/jobs:- set
"batchJobsEndpoint": false
- set
- Synchronous processing
/result:- set
"synchronousProcessing": false
- set
- Web-services
/services:- set
"webServicesEndpoint": false
- set
- Files
/files:- set
"filesEndpoint": false
- set
- User-defined process-graphs
/process_graphs:- set
"processGraphsEndpoint": false
- set
- Processing-parameters extension
/processing_parameters:- set
"processingParameters": false
- set
- UDF Framework
/udf_runtimes- set
"userDefinedFunctions": falseAny of these configuration options can be overridden using environment variables. For example:
- set
WEBSERVICESENDPOINT=false PORT=8081 npm startTo use the bearer token format prior to openEO specification 1.3.0, edit the following flag in the config.json file:
- set
"legacyTokens": true, or start the api with the environment variablelegacytokens=true.
This may be necessary for clients that don't yet support the 1.3.0 specification.
After configuration, the API can be started. Run npm start to start the server.
To allow testing the full functionality of the API, it is recommended to set up user accounts before starting.
- Add a new user:
npm run adduser - Delete a user:
npm run deluser - List all users:
npm run users
In the testing suite of your choice you may connect the client to be tested to the API after starting the server using npm start. By default the endpoint will listen at http://127.0.0.1:8080
Create the docker image using:
docker build -t openeo-test-api .docker-compose.yml contains environment variables to define a test-user. Adjust these in accordance to your test definition.
Run the docker container using:
docker compose upIn the directory of the docker-compose.yml file.
To take down the docker container, run:
docker compose down