i-dot-ai / caddy-chatbot

Caddy is an AI powered co-pilot for customer service functions everywhere.
https://ai.gov.uk/projects/caddy/
MIT License
15 stars 4 forks source link

Run and test against dynamoDB locally #178

Closed duncanjbrown closed 1 month ago

duncanjbrown commented 1 month ago

In order to run tests locally (so we can refactor fast), and also to break coupling between the deployed dev environment and versions we run on our laptops (to minimise onboarding pain and accidental side effects), this PR introduces a way to run a local copy of DynamoDB.

It gets the app to a point where it can connect to dDB and run, although I haven't tested it doing anything with a local dynamoDB. Given that running a local dynamoDB is still optional at this point (and not turned on by default!) I'm raising this PR so we can get this into the repo to build on — the old behaviour shouldn't be affected.

Changes included in this PR

Deficiency

There's no obvious way to run DDB as a service via homebrew, so to run tests in the near future it will be necessary to start dynamodb-local in a separate terminal window (or equivalent!) before running the tests. Perhaps we can docker-compose our way out of that soon!