Testing guide#
Once you’ve made some changes to the codebase, it is important to run tests.
Ingestion tests#
Ensure you’ve gone through the quickstart guide. Ensure that the Docker daemon is running.
Install the Python dependencies, including dev-dependencies.
$ just ingestion_server/install
Caution
If you experience error installing
psycopg2
, refer to documentation about thepsycopg2
build prerequisites.Run the integration tests.
$ just ingestion_server/test-local
Note that if an
.env
file exists in the folder you’re runningjust
from, it may interfere with the integration test variables and cause unexpected failures.
Making general test requests#
To make cURL requests to the local server:
just ingestion_server/curl-post '{"model": <model>, "action": <action>}'
Replace <model>
and <action>
with the correct values. For example, to
download and index all new images, <model>
will be "image"
and <action>
will be "INGEST_UPSTREAM"
.