2022-06-20 16:33:04 +03:00
.PHONY : test -bigquery
## test-bigquery: run tests for BigQuery backend
2022-10-04 11:30:09 +03:00
# will require some setup detailed here: https://github.com/hasura/graphql-engine-mono/tree/main/server/lib/api-tests#required-setup-for-bigquery-tests
2022-11-03 20:16:29 +03:00
test-bigquery : remove -tix -file
docker compose up -d --wait postgres
2022-07-22 13:56:03 +03:00
$( call stop_after, \
2022-11-25 18:07:57 +03:00
HASURA_TEST_BACKEND_TYPE = BigQuery \
cabal run api-tests:exe:api-tests)
2022-06-20 16:33:04 +03:00
.PHONY : test -sqlserver
2022-11-17 15:55:05 +03:00
## test-sqlserver: run tests for MS SQL Server backend
test-sqlserver : remove -tix -file
2022-11-22 19:40:29 +03:00
docker compose up -d --wait postgres sqlserver-healthcheck
2022-07-22 13:56:03 +03:00
$( call stop_after, \
2022-11-25 18:07:57 +03:00
HASURA_TEST_BACKEND_TYPE = SQLServer \
cabal run api-tests:exe:api-tests)
2022-06-20 16:33:04 +03:00
2022-08-03 14:05:59 +03:00
.PHONY : test -citus
## test-citus: run tests for Citus backend
2022-11-03 20:16:29 +03:00
test-citus : remove -tix -file
2022-11-18 14:09:04 +03:00
docker compose up -d --wait postgres citus
2022-08-03 14:05:59 +03:00
$( call stop_after, \
2022-11-25 18:07:57 +03:00
HASURA_TEST_BACKEND_TYPE = Citus \
cabal run api-tests:exe:api-tests)
2022-08-03 14:05:59 +03:00
2022-08-25 15:08:07 +03:00
.PHONY : test -data -connectors
## test-data-connectors: run tests for Data Connectors
2022-11-03 20:16:29 +03:00
test-data-connectors : remove -tix -file
2022-11-17 15:55:05 +03:00
docker compose build
2022-11-03 20:16:29 +03:00
docker compose up -d --wait postgres dc-reference-agent dc-sqlite-agent
2022-08-25 15:08:07 +03:00
$( call stop_after, \
2022-11-25 18:07:57 +03:00
HASURA_TEST_BACKEND_TYPE = DataConnector \
cabal run api-tests:exe:api-tests)
2022-08-25 15:08:07 +03:00
2022-08-25 20:17:28 +03:00
.PHONY : test -cockroach
## test-cockroach: run tests for Cockroach backend
2022-11-03 20:16:29 +03:00
test-cockroach : remove -tix -file
docker compose up -d --wait postgres cockroach
2022-08-25 20:17:28 +03:00
$( call stop_after, \
2022-11-25 18:07:57 +03:00
HASURA_TEST_BACKEND_TYPE = Cockroach \
cabal run api-tests:exe:api-tests)
2022-08-25 20:17:28 +03:00
2022-11-01 18:17:45 +03:00
.PHONY : test -postgres
## test-postgres: run tests for Postgres backend
2022-11-18 01:34:02 +03:00
# we have a few tests labeled with 'Postgres' which test their variants, too,
# so this also starts containers for Postgres variants
2022-11-17 15:55:05 +03:00
test-postgres : remove -tix -file
2022-12-07 12:26:08 +03:00
docker compose up -d --wait postgres cockroach citus dc-sqlite-agent
2022-11-01 18:17:45 +03:00
$( call stop_after, \
2022-11-25 18:07:57 +03:00
HASURA_TEST_BACKEND_TYPE = Postgres \
cabal run api-tests:exe:api-tests)
.PHONY : test -no -backends
## test-no-backends
# the leftover tests with no particular backend, like Remote Schemas
test-no-backends : start -backends remove -tix -file
$( call stop_after, \
HASURA_TEST_BACKEND_TYPE = None \
cabal run api-tests:exe:api-tests)
2022-11-01 18:17:45 +03:00
2022-06-20 16:33:04 +03:00
.PHONY : test -backends
## test-backends: run tests for all backends
2022-10-04 11:30:09 +03:00
# BigQuery tests will require some setup detailed here: https://github.com/hasura/graphql-engine-mono/tree/main/server/lib/api-tests#required-setup-for-bigquery-tests
2022-07-20 14:20:35 +03:00
test-backends : start -backends remove -tix -file
2022-07-22 13:56:03 +03:00
$( call stop_after, \
2022-11-15 01:37:09 +03:00
cabal run api-tests:exe:api-tests)
2022-08-19 14:22:28 +03:00
.PHONY : test -unit
## test-unit: run unit tests from main suite
test-unit : remove -tix -file
2022-11-17 15:55:05 +03:00
cabal run graphql-engine:test:graphql-engine-tests
.PHONY : test -integration -mssql
## test-integration-mssql: run MS SQL Server integration tests
test-integration-mssql : remove -tix -file
docker compose up -d --wait sqlserver{ ,-healthcheck,-init}
$( call stop_after, \
HASURA_MSSQL_CONN_STR = '$(TEST_MSSQL_CONNECTION_STRING)' \
cabal run graphql-engine:test:graphql-engine-test-mssql)
.PHONY : test -integration -postgres
## test-integration-postgres: run PostgreSQL integration tests
test-integration-postgres : remove -tix -file
docker compose up -d --wait postgres
$( call stop_after, \
HASURA_GRAPHQL_DATABASE_URL = '$(TEST_POSTGRES_URL)' \
cabal run graphql-engine:test:graphql-engine-test-postgres)
2022-12-07 17:11:43 +03:00
.PHONY : py -tests
## py-tests: run the python-based test suite
py-tests :
$( call stop_after, \
./server/tests-py/run-new.sh)