jet/tests
go-jet 4bb9775134 Merge remote-tracking branch 'upstream/master' into stmt-cache2
# Conflicts:
#	tests/postgres/alltypes_test.go
#	tests/postgres/northwind_test.go
#	tests/postgres/sample_test.go
#	tests/postgres/update_test.go
#	tests/sqlite/insert_test.go
#	tests/sqlite/main_test.go
#	tests/sqlite/sample_test.go
#	tests/sqlite/update_test.go
2024-10-19 14:01:55 +02:00
..
dbconfig Add support for CockorachDB. 2022-05-05 13:01:42 +02:00
init Adding gosec and lint, fixing null_type overflow 2024-10-14 11:06:59 -04:00
internal/utils Adding gosec and lint, fixing null_type overflow 2024-10-14 11:06:59 -04:00
mysql Merge remote-tracking branch 'upstream/master' into stmt-cache2 2024-10-19 14:01:55 +02:00
postgres Merge remote-tracking branch 'upstream/master' into stmt-cache2 2024-10-19 14:01:55 +02:00
sqlite Merge remote-tracking branch 'upstream/master' into stmt-cache2 2024-10-19 14:01:55 +02:00
testdata@6a397747d3 Improved support for intervals in postgres 2024-10-08 08:30:33 -04:00
docker-compose.yaml Updating mysql version to allow to run on OS X as well 2024-10-07 08:46:38 -04:00
Makefile Addressing code review comments 2024-10-07 12:54:58 -04: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