diff options
Diffstat (limited to 'test/tracetesting/cart/check-if-cart-is-empty.yaml')
| -rw-r--r-- | test/tracetesting/cart/check-if-cart-is-empty.yaml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/tracetesting/cart/check-if-cart-is-empty.yaml b/test/tracetesting/cart/check-if-cart-is-empty.yaml new file mode 100644 index 0000000..de9f409 --- /dev/null +++ b/test/tracetesting/cart/check-if-cart-is-empty.yaml @@ -0,0 +1,27 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: cart-check-if-cart-is-empty + name: 'Cart: check if cart is empty' + description: Check if the shopping cart has no items + 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 no items + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.body | json_path '$.items' = "[]" |
