graphql-engine/dc-agents/sqlite/test/TESTING.md
Matthew Goodwin ea6d9226d7 Sql lite testing revisions
As I have been onboarding, in order to get a working sqlite agent/db running locally, I got some helpful steps from @mattshardman which I adapted into this testing setup.

Hopefully this should ease the pain for the next person needing to do this!

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6261
GitOrigin-RevId: 03a3f04e38f118898bfd1d27de9305739dee5276
2022-10-12 20:28:24 +00:00

1.5 KiB

Setting up agent/db

This will create an agent and simple sqlite db for you to be able to interact with in the HGE Console

To finish this setup, you will need a working local Console, so do that first.

  1. cd into dc-agents/sqlite and run
docker build . -t sqlite-agent
  1. cd into dc-agents/sqlite/test and run
docker compose up -d
  1. From the Console, go to Settings -> Feature Flags and enable Experimental features for GDC

  2. From the Data tab, click Manage and click Add Agent.

  3. Name your agent sqlite agent and depending on your docker setup, for URL use http://localhost:8100 or http://host.docker.internal:8100. If you're not sure, try both and see which works!

Screen Shot 2022-10-07 at 11 06 59 AM

  1. Aftering adding the agent, click Connect Database and for the Data Source Driver choose sqlite agent from the dropdown menu.
  2. For Database Display Name type in sqlite-test and for db type in /chinook.db and click Connect Database

Screen Shot 2022-10-07 at 11 16 34 AM

You should now have this new databse listed on the left: Screen Shot 2022-10-07 at 11 12 52 AM