File tree 5 files changed +20
-5
lines changed
instrumentation/opentelemetry-instrumentation-wsgi/tests
5 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 28
28
env :
29
29
NUMBER : ${{ github.event.inputs.number }}
30
30
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
31
- GITHUB_TOKEN : ${{ secrets.BOT_TOKEN }}
31
+ GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
32
32
run : |
33
33
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
34
34
title=$(gh pr view $NUMBER --json title --jq .title)
Original file line number Diff line number Diff line change 69
69
- name : Create pull request
70
70
env :
71
71
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
72
- GITHUB_TOKEN : ${{ secrets.BOT_TOKEN }}
72
+ GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
73
73
run : |
74
74
message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}"
75
75
branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
Original file line number Diff line number Diff line change 96
96
- name : Create pull request against the release branch
97
97
env :
98
98
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
99
- GITHUB_TOKEN : ${{ secrets.BOT_TOKEN }}
99
+ GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
100
100
run : |
101
101
message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}"
102
102
branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
@@ -181,7 +181,7 @@ jobs:
181
181
- name : Create pull request against main
182
182
env :
183
183
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
184
- GITHUB_TOKEN : ${{ secrets.BOT_TOKEN }}
184
+ GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
185
185
run : |
186
186
message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}"
187
187
body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}\`."
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ jobs:
184
184
- name : Create pull request against main
185
185
env :
186
186
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
187
- GITHUB_TOKEN : ${{ secrets.BOT_TOKEN }}
187
+ GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
188
188
run : |
189
189
message="Copy change log updates from $GITHUB_REF_NAME"
190
190
body="Copy log updates from \`$GITHUB_REF_NAME\`."
Original file line number Diff line number Diff line change @@ -484,6 +484,21 @@ def test_basic_wsgi_call(self):
484
484
response = app (self .environ , self .start_response )
485
485
self .validate_response (response , exporter )
486
486
487
+ def test_no_op_tracer_provider (self ):
488
+ app = otel_wsgi .OpenTelemetryMiddleware (
489
+ simple_wsgi , tracer_provider = trace_api .NoOpTracerProvider ()
490
+ )
491
+
492
+ response = app (self .environ , self .start_response )
493
+ while True :
494
+ try :
495
+ value = next (response )
496
+ self .assertEqual (value , b"*" )
497
+ except StopIteration :
498
+ break
499
+ span_list = self .memory_exporter .get_finished_spans ()
500
+ self .assertEqual (len (span_list ), 0 )
501
+
487
502
488
503
class TestWsgiMiddlewareWrappedWithAnotherFramework (WsgiTestBase ):
489
504
def test_mark_span_internal_in_presence_of_span_from_other_framework (self ):
You can’t perform that action at this time.
0 commit comments