Skip to content

Commit 6abd618

Browse files
committed
test(harness): add end-to-end harness test for --telemetry flag
Verifies that enabling OpenTelemetry tracing via --telemetry does not affect the served response: the server span wraps the request handler transparently and the mock response is returned as normal. Refs #2804
1 parent 5d78edf commit 6abd618

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
====test====
2+
When prism is started with the --telemetry flag, OpenTelemetry tracing is enabled but
3+
responses are still served normally (the server span wraps the handler transparently).
4+
====spec====
5+
openapi: 3.0.2
6+
paths:
7+
/todos:
8+
get:
9+
responses:
10+
200:
11+
description: Get Todo Items
12+
content:
13+
'application/json':
14+
example: hello
15+
====server====
16+
mock -p 4010 --telemetry ${document}
17+
====command====
18+
curl -i -X GET http://localhost:4010/todos -H "accept: application/json"
19+
====expect-loose====
20+
HTTP/1.1 200 OK
21+
content-type: application/json
22+
23+
"hello"

0 commit comments

Comments
 (0)