jet/tests
Samir Faci 99be328e9d Replacing several test util function with a generic version
ChangeLog:
  - updated several test utils with a generic PtrOf
  - updated references using iotils (Deprecated) with os equivalent import.
2024-10-05 13:13:55 -04:00
..
dbconfig Add support for CockorachDB. 2022-05-05 13:01:42 +02:00
init Replacing several test util function with a generic version 2024-10-05 13:13:55 -04:00
internal/utils Replacing several test util function with a generic version 2024-10-05 13:13:55 -04:00
mysql Replacing several test util function with a generic version 2024-10-05 13:13:55 -04:00
postgres Replacing several test util function with a generic version 2024-10-05 13:13:55 -04:00
sqlite Replacing several test util function with a generic version 2024-10-05 13:13:55 -04:00
testdata@915bdc16b7 Range types implemented 2024-02-25 01:20:36 +01:00
docker-compose.yaml Reverting circleci docker-compose 2024-09-22 16:12:43 -04:00
Makefile Move back to test_sample 2023-01-30 15:01:08 -05:00
Readme.md Update circle.ci 2021-12-19 18:25:55 +01:00

Integration tests

This folder contains integration tests intended to test jet generator, statements and query result mapping with a running database.

How to run tests?

Before we can run tests, we need to set up and initialize test databases. To simplify the process there is a Makefile with a list of helper commands.

# We first need to checkout testdata from separate repository into git submodule,
# then download docker image for each of the databases listed in docker-compose.yaml file, and 
# finally run and initialize databases with downloaded test data.
# Note that on the first run this command might take a couple of minutes.
make setup

# When databases are ready, we can generate sql builder and model types for each of the test databases
make jet-gen-all

Then we can run the tests the usual way:

go test -v ./...

To removes test containers, volumes, and images:

make cleanup