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-07-22 13:56:03 +03:00
|
|
|
define stop_after
|
|
|
|
@ echo $1 >&2
|
|
|
|
@ $1 || EXIT_STATUS=$$?; \
|
|
|
|
if [[ -z "$${EXIT_STATUS:-}" ]]; then \
|
|
|
|
$(MAKE) stop-everything; \
|
|
|
|
else \
|
|
|
|
$(MAKE) stop-everything; \
|
|
|
|
exit $$EXIT_STATUS; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
2022-11-14 15:38:19 +03:00
|
|
|
.PHONY: build-backends
|
|
|
|
## build-backends: build Docker images for any backends that need them
|
|
|
|
build-backends:
|
|
|
|
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
|
|
|
|
docker compose up --detach --wait
|
2022-07-22 13:56:03 +03:00
|
|
|
|
|
|
|
.PHONY: stop-everything
|
|
|
|
## stop-everything: tear down test databases
|
|
|
|
stop-everything:
|
2022-11-14 15:38:19 +03:00
|
|
|
docker compose down --volumes
|
2022-12-07 17:11:43 +03:00
|
|
|
cd server/tests-py && 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
|