Skip to content

Commit c41c4ec

Browse files
authored
Merge branch 'main' into trentm-lint-examples-hapi
2 parents eab2f58 + b6d293a commit c41c4ec

File tree

14 files changed

+834
-233
lines changed

14 files changed

+834
-233
lines changed

.github/workflows/test-all-versions.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ jobs:
163163
- uses: actions/setup-node@v4
164164
with:
165165
node-version: ${{ matrix.node }}
166-
- name: Set MySQL variables
167-
run: mysql --user=root --password=${MYSQL_ROOT_PASSWORD} --host=${MYSQL_HOST} --port=${MYSQL_PORT} -e "SET GLOBAL log_output='TABLE'; SET GLOBAL general_log = 1;" mysql
168166
- name: Install
169167
run: npm ci
170168
- name: Download Build Artifacts

.github/workflows/unit-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ jobs:
176176
- uses: actions/setup-node@v4
177177
with:
178178
node-version: ${{ matrix.node }}
179-
- name: Set MySQL variables
180-
run: mysql --user=root --password=${MYSQL_ROOT_PASSWORD} --host=${MYSQL_HOST} --port=${MYSQL_PORT} -e "SET GLOBAL log_output='TABLE'; SET GLOBAL general_log = 1;" mysql
181179
- name: Install
182180
run: npm ci
183181
- name: Download Build Artifacts

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,34 @@ The conventional commit type (in PR title) is very important to automatically bu
135135

136136
There is no need to update the CHANGELOG in a PR because it will be updated as part of the release process (see [RELEASING.md](RELEASING.md) for more details).
137137

138+
### Testing
139+
140+
Most unit tests case be run via:
141+
142+
```sh
143+
npm test
144+
```
145+
146+
However, some instrumentations require test-services to be running (e.g. the `instrumentation-mongodb` package requires a MongoDB server). Use the `test-services`-related npm scripts to start all required services in Docker and then run the tests with the appropriate configuration to use those services:
147+
148+
```sh
149+
npm run test-services:start # starts services in Docker
150+
npm run test:with-services-config # runs 'npm test' with envvars from test/test-services.env
151+
npm run test-services:stop # stops services in Docker
152+
```
153+
154+
If you only want to test a single package (e.g. the `instrumentation-mongodb`) you can `cd` into it and run the tests after you started the services.
155+
156+
```sh
157+
npm run test-services:start # starts services in Docker
158+
cd plugins/node/opentelemetry-instrumentation-mongodb # get into the instrumenation folder
159+
RUN_MONGODB_TESTS=1 npm test # run the test with the proper config (check each package)
160+
cd ../../.. # go back to root folder
161+
npm run test-services:stop # stops services in Docker
162+
```
163+
164+
NOTE: scripts for each package will be added to avoid extra consumption of resources and improve the development experience.
165+
138166
### Benchmarks
139167

140168
When two or more approaches must be compared, please write a benchmark in the benchmark/index.js module so that we can keep track of the most efficient algorithm.

incubator/opentelemetry-sampler-aws-xray/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"@types/mocha": "10.0.10",
5555
"@types/node": "18.18.14",
5656
"@types/sinon": "17.0.4",
57-
"@typescript-eslint/eslint-plugin": "5.8.1",
58-
"@typescript-eslint/parser": "5.8.1",
57+
"@typescript-eslint/eslint-plugin": "5.62.0",
58+
"@typescript-eslint/parser": "5.62.0",
5959
"eslint": "8.7.0",
6060
"expect": "29.2.0",
6161
"nock": "13.3.3",

0 commit comments

Comments
 (0)