Skip to content

Commit

Permalink
chore: add a convenience Makefile; fix mssql service in docker-compose
Browse files Browse the repository at this point in the history
First, add a Makefile for those with 'make' in their blood: make all test

Also fix mssql image usage after breakage in the latest release, copying
what was done in elastic/apm-agent-nodejs#4150
  • Loading branch information
trentm committed Aug 1, 2024
1 parent a2b414c commit 247d62a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is pure a convenience wrapper around calling npm scripts for those
# with `make` in their veins. Though shalt not add complex logic here.

.PHONY: all
all:
npm ci

.PHONY: lint
lint:
npm run lint

.PHONY: test
test:
cd packages/opentelemetry-node \
&& npm run test-services:start \
&& npm test \
&& npm run test-services:stop

10 changes: 6 additions & 4 deletions packages/opentelemetry-node/test/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ services:
retries: 30

mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
# Tags listed at https://hub.docker.com/r/microsoft/mssql-server
# Docs: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker
image: mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
platform: linux/amd64
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=Very(!)Secure
ports:
- "1433:1433"
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1"]
interval: 30s
test: ["CMD", "/opt/mssql-tools18/bin/sqlcmd", "-C", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1"]
interval: 1s
timeout: 10s
retries: 5
retries: 30

0 comments on commit 247d62a

Please sign in to comment.