Here is a very basic first pass at running simple unit tests (#36). This leverages GitHub workflows and the Elasticsearch Docker release to create a dummy index that looks like our real one. Then it spins up the API server and queries a few basic elements. This isn't exhaustive, but works locally.
Some notes:
The mappings are copied from story-indexer for now and replicated in test.create_fixtures.py. Is there a clever way to automatically keep that in sync?
I had to move the requirements out of the Dockerfile and into requirements.txt. I don't think this messed up the docker build but I'm not an expert there.
I removed some workflows that looked un-related to our fork of this repo.
I hard-coded to python 3.10 and elasticsearch 8.8.2. My poking around suggested that matched what we're using in other places.
Here is a very basic first pass at running simple unit tests (#36). This leverages GitHub workflows and the Elasticsearch Docker release to create a dummy index that looks like our real one. Then it spins up the API server and queries a few basic elements. This isn't exhaustive, but works locally.
Some notes:
story-indexer
for now and replicated intest.create_fixtures.py
. Is there a clever way to automatically keep that in sync?