Skip to content

Commit 1ffd096

Browse files
wip
1 parent cf5395d commit 1ffd096

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

.evergreen/config.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,20 @@ functions:
208208
TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \
209209
.evergreen/run-tests.sh
210210
211+
"run OTel tests":
212+
- command: shell.exec
213+
type: test
214+
params:
215+
shell: bash
216+
working_dir: "src"
217+
script: |
218+
${PREPARE_SHELL}
219+
export OTEL_SPEC_TESTS=1
220+
unset TOPOLOGY
221+
export TOPOLOGY=${MLAUNCH_TOPOLOGY}
222+
TEST_CMD="bundle exec rspec spec/spec_tests/open_telemetry_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \
223+
.evergreen/run-tests.sh
224+
211225
"export FLE credentials":
212226
- command: shell.exec
213227
type: test
@@ -641,6 +655,9 @@ tasks:
641655
- name: "test-csot"
642656
commands:
643657
- func: "run CSOT tests"
658+
- name: "test-otel"
659+
commands:
660+
- func: "run OTel tests"
644661
- name: "test-fle"
645662
commands:
646663
- func: "export FLE credentials"
@@ -1257,6 +1274,16 @@ buildvariants:
12571274
tasks:
12581275
- name: test-csot
12591276

1277+
- matrix_name: OTel
1278+
matrix_spec:
1279+
ruby: "ruby-3.3"
1280+
mongodb-version: "8.0"
1281+
topology: replica-set-single-node
1282+
os: ubuntu2204
1283+
display_name: "OTel - ${mongodb-version}"
1284+
tasks:
1285+
- name: test-otel
1286+
12601287
- matrix_name: "no-retry-reads"
12611288
matrix_spec:
12621289
retry-reads: no-retry-reads

.evergreen/config/common.yml.erb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,20 @@ functions:
205205
TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \
206206
.evergreen/run-tests.sh
207207

208+
"run OTel tests":
209+
- command: shell.exec
210+
type: test
211+
params:
212+
shell: bash
213+
working_dir: "src"
214+
script: |
215+
${PREPARE_SHELL}
216+
export OTEL_SPEC_TESTS=1
217+
unset TOPOLOGY
218+
export TOPOLOGY=${MLAUNCH_TOPOLOGY}
219+
TEST_CMD="bundle exec rspec spec/spec_tests/open_telemetry_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \
220+
.evergreen/run-tests.sh
221+
208222
"export FLE credentials":
209223
- command: shell.exec
210224
type: test
@@ -638,6 +652,9 @@ tasks:
638652
- name: "test-csot"
639653
commands:
640654
- func: "run CSOT tests"
655+
- name: "test-otel"
656+
commands:
657+
- func: "run OTel tests"
641658
- name: "test-fle"
642659
commands:
643660
- func: "export FLE credentials"

.evergreen/config/standard.yml.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ buildvariants:
144144
tasks:
145145
- name: test-csot
146146

147+
- matrix_name: OTel
148+
matrix_spec:
149+
ruby: <%= latest_ruby %>
150+
mongodb-version: <%= latest_stable_mdb %>
151+
topology: replica-set-single-node
152+
os: ubuntu2204
153+
display_name: "OTel - ${mongodb-version}"
154+
tasks:
155+
- name: test-otel
156+
147157
- matrix_name: "no-retry-reads"
148158
matrix_spec:
149159
retry-reads: no-retry-reads

spec/spec_tests/open_telemetry_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
warn "Skipping OpenTelemetry unified spec test: #{filename}"
2222
end
2323

24-
describe 'OpenTelemetry unified spec tests' do
24+
if [ 1, '1', 'yes', 'true' ].include?(ENV['OTEL_SPEC_TESTS'])
2525
define_unified_spec_tests(base, TESTS_TO_RUN)
26+
else
27+
skip 'OTel spec tests are disabled. To enable them set env variable OTEL_SPEC_TESTS to 1'
2628
end

0 commit comments

Comments
 (0)