2023-01-16 19:42:45 +03:00
|
|
|
API_TESTS_DOCKER_COMPOSE = docker compose --project-directory=./server/lib/api-tests
|
2023-05-04 00:11:12 +03:00
|
|
|
DC_POSTGRES_DOCKER_COMPOSE = docker compose --project-directory=./pro/dc-agents/postgres/
|
2023-02-16 09:29:19 +03:00
|
|
|
API_PRO_TESTS_DOCKER_COMPOSE = docker compose --project-directory=./pro/server/lib/api-tests
|
2023-01-16 19:42:45 +03:00
|
|
|
PYTHON_TESTS_DOCKER_COMPOSE = docker compose --project-directory=./server/tests-py
|
|
|
|
|
2022-09-21 19:47:11 +03:00
|
|
|
# Use the Azure SQL Edge image instead of the SQL Server image on arm64.
|
|
|
|
# The latter doesn't work yet.
|
|
|
|
ifeq ($(shell uname -m),arm64)
|
|
|
|
MSSQL_IMAGE=mcr.microsoft.com/azure-sql-edge
|
2022-07-27 16:29:06 +03:00
|
|
|
else
|
2022-09-21 19:47:11 +03:00
|
|
|
MSSQL_IMAGE= # allow the Docker Compose file to set the image
|
2022-07-27 16:29:06 +03:00
|
|
|
endif
|
|
|
|
|
2022-09-21 19:47:11 +03:00
|
|
|
export MSSQL_IMAGE
|
2022-07-27 16:29:06 +03:00
|
|
|
|
2022-11-17 15:55:05 +03:00
|
|
|
TEST_MSSQL_CONNECTION_STRING = Driver={ODBC Driver 18 for SQL Server};Server=localhost,65003;Uid=sa;Pwd=Password!;Encrypt=optional
|
|
|
|
TEST_POSTGRES_URL = postgres://hasura:hasura@localhost:65002/hasura
|
|
|
|
|
2022-11-14 15:38:19 +03:00
|
|
|
.PHONY: build-backends
|
|
|
|
## build-backends: build Docker images for any backends that need them
|
|
|
|
build-backends:
|
2023-01-16 19:42:45 +03:00
|
|
|
$(API_TESTS_DOCKER_COMPOSE) build
|
2022-07-27 16:29:06 +03:00
|
|
|
|
2022-07-22 13:56:03 +03:00
|
|
|
.PHONY: start-backends
|
2022-09-08 10:47:30 +03:00
|
|
|
## start-backends: start all known backends in Docker and wait for them to be ready
|
2022-11-14 15:38:19 +03:00
|
|
|
start-backends: build-backends
|
2023-01-16 19:42:45 +03:00
|
|
|
$(API_TESTS_DOCKER_COMPOSE) up --detach --wait
|
2022-07-22 13:56:03 +03:00
|
|
|
|
|
|
|
.PHONY: stop-everything
|
|
|
|
## stop-everything: tear down test databases
|
|
|
|
stop-everything:
|
2023-01-16 19:42:45 +03:00
|
|
|
$(API_TESTS_DOCKER_COMPOSE) down --volumes
|
2023-02-16 09:29:19 +03:00
|
|
|
$(API_PRO_TESTS_DOCKER_COMPOSE) down --volumes
|
2023-01-16 19:42:45 +03:00
|
|
|
$(PYTHON_TESTS_DOCKER_COMPOSE) down --volumes
|
2023-05-04 16:10:23 +03:00
|
|
|
$(DC_POSTGRES_DOCKER_COMPOSE) down --volumes
|
2022-07-22 13:56:03 +03:00
|
|
|
|
|
|
|
.PHONY: remove-tix-file
|
|
|
|
remove-tix-file:
|
2022-10-06 12:44:49 +03:00
|
|
|
@ find . -name '*.tix' -delete
|