-
Notifications
You must be signed in to change notification settings - Fork 580
chore: Add docker compose and test services scripts #2886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: Add docker compose and test services scripts #2886
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2886 +/- ##
==========================================
+ Coverage 89.53% 89.78% +0.25%
==========================================
Files 182 187 +5
Lines 8837 9147 +310
Branches 1844 1884 +40
==========================================
+ Hits 7912 8213 +301
- Misses 925 934 +9 🚀 New features to boost your workflow:
|
This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature. |
@@ -163,8 +163,6 @@ jobs: | |||
- uses: actions/setup-node@v4 | |||
with: | |||
node-version: ${{ matrix.node }} | |||
- name: Set MySQL variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for reviewer: this is required only for testing @opentelemetry/instrumentation-mysql
and can be executed as a query using the client. Hence is removed from there and added in plugins/node/opentelemetry-instrumentation-mysql/test/mysql.test.ts
@@ -176,8 +176,6 @@ jobs: | |||
- uses: actions/setup-node@v4 | |||
with: | |||
node-version: ${{ matrix.node }} | |||
- name: Set MySQL variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for reviewer: same here
const shouldTest = process.env.RUN_MYSQL_TESTS; | ||
|
||
before(async function () { | ||
const connection = createConnection({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for reviewer: enabling here the general_log
setting instead of doing it in the workflows
@@ -64,7 +64,7 @@ const memoryExporter = new InMemorySpanExporter(); | |||
const CONFIG = { | |||
user: process.env.POSTGRES_USER || 'postgres', | |||
password: process.env.POSTGRES_PASSWORD || 'postgres', | |||
database: process.env.POSTGRES_DB || 'postgres', | |||
database: process.env.POSTGRES_DB || 'otel_pg_database', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for reviewer: align the value with the one in workflow services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this, small nit tho.
"test-services:start": "docker compose -f ./test/docker-compose.yaml up -d --wait", | ||
"test-services:stop": "docker compose -f ./test/docker-compose.yaml down", | ||
"test:with-services-config": "NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=./test/test-services.env npm test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use cross-env
or something similar to not bail on Windows.
Which problem is this PR solving?
Short description of the changes