summaryrefslogtreecommitdiff
path: root/test/tracetesting/frontend/05-view-cart.yaml
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
committerSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
commit82e03978b89938219958032efb1448cc76baa181 (patch)
tree626f3e54d52ecd49be0ed3bee30abacc0453d081 /test/tracetesting/frontend/05-view-cart.yaml
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'test/tracetesting/frontend/05-view-cart.yaml')
-rw-r--r--test/tracetesting/frontend/05-view-cart.yaml25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/tracetesting/frontend/05-view-cart.yaml b/test/tracetesting/frontend/05-view-cart.yaml
new file mode 100644
index 0000000..68f8f06
--- /dev/null
+++ b/test/tracetesting/frontend/05-view-cart.yaml
@@ -0,0 +1,25 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+type: Test
+spec:
+ id: frontend-view-cart
+ name: 'Frontend: View cart'
+ description: Simulate a user viewing the shopping cart
+ trigger:
+ type: http
+ httpRequest:
+ url: http://${var:FRONTEND_ADDR}/api/cart?userId=2491f868-88f1-4345-8836-d5d8511a9f83
+ method: GET
+ headers:
+ - key: Content-Type
+ value: application/json
+ specs:
+ - name: It called the frontend with success
+ selector: span[tracetest.span.type="general" name="Tracetest trigger"]
+ assertions:
+ - attr:tracetest.response.status = 200
+ - name: It retrieved the cart items correctly
+ selector: span[name="POST /oteldemo.CartService/GetCart"]
+ assertions:
+ - attr:grpc.status_code = 0