forked from open-telemetry/opentelemetry-js-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add 'test-services' system for running tests locally with requi…
…site services in Docker tl;dr: npm run test-services:start # starts services in Docker npm run test:with-test-services # runs 'npm test' with envvars from test/test-services.env npm run test-services:stop # stops Docker containers Closes: open-telemetry#2038
- Loading branch information
Showing
16 changed files
with
135 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# A `docker compose` config file to run services required for testing some | ||
# packages. | ||
# | ||
# Note: This isn't used in CI. CI uses GitHub Actions' `services: ...` for | ||
# defining test services. | ||
# | ||
# Usage: | ||
# npm run test-services:start [SERVICE ...] | ||
# npm run test:with-test-services # runs test with 'test-services.env' envvars | ||
# npm run test-services:stop [SERVICE ...] | ||
|
||
name: oteljs-test-services | ||
|
||
services: | ||
redis: | ||
image: redis:7 | ||
ports: | ||
- "63790:6379" | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "ping"] | ||
interval: 1s | ||
timeout: 10s | ||
retries: 30 | ||
|
||
mongo: | ||
image: mongo:7 | ||
ports: | ||
- "27017:27017" | ||
healthcheck: | ||
test: ["CMD", "mongosh", "--eval", "db.runCommand('ping').ok", "--quiet"] | ||
interval: 1s | ||
timeout: 10s | ||
retries: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
RUN_REDIS_TESTS=1 | ||
OPENTELEMETRY_REDIS_HOST=localhost | ||
OPENTELEMETRY_REDIS_PORT=63790 | ||
|
||
RUN_MONGODB_TESTS: 1 | ||
MONGODB_DB: opentelemetry-tests | ||
MONGODB_HOST: 127.0.0.1 | ||
MONGODB_PORT: 27017 |