diff options
| author | Saumit <justsaumit@protonmail.com> | 2025-09-27 02:14:26 +0530 |
|---|---|---|
| committer | Saumit <justsaumit@protonmail.com> | 2025-09-27 02:14:26 +0530 |
| commit | 82e03978b89938219958032efb1448cc76baa181 (patch) | |
| tree | 626f3e54d52ecd49be0ed3bee30abacc0453d081 /test/tracetesting/cart/check-if-cart-is-populated.yaml | |
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'test/tracetesting/cart/check-if-cart-is-populated.yaml')
| -rw-r--r-- | test/tracetesting/cart/check-if-cart-is-populated.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/tracetesting/cart/check-if-cart-is-populated.yaml b/test/tracetesting/cart/check-if-cart-is-populated.yaml new file mode 100644 index 0000000..db753c1 --- /dev/null +++ b/test/tracetesting/cart/check-if-cart-is-populated.yaml @@ -0,0 +1,28 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: cart-check-if-cart-is-populated + name: 'Cart: check if cart is populated' + description: Check if the shopping cart has one item + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:CART_ADDR} + method: oteldemo.CartService.GetCart + request: |- + { + "userId": "1234" + } + specs: + - name: It retrieved the cart items correctly + selector: span[name="POST /oteldemo.CartService/GetCart"] + assertions: + - attr:grpc.status_code = 0 + - name: It returned the first item with correct attributes + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.body | json_path '$.items[0].quantity' = 1 + - attr:tracetest.response.body | json_path '$.items[0].productId' = "OLJCESPC7Z" |
