From 82e03978b89938219958032efb1448cc76baa181 Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 27 Sep 2025 02:14:26 +0530 Subject: Initial snapshot - OpenTelemetry demo 2.1.3 -f --- test/tracetesting/shipping/quote.yaml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/tracetesting/shipping/quote.yaml (limited to 'test/tracetesting/shipping/quote.yaml') diff --git a/test/tracetesting/shipping/quote.yaml b/test/tracetesting/shipping/quote.yaml new file mode 100644 index 0000000..c263fa8 --- /dev/null +++ b/test/tracetesting/shipping/quote.yaml @@ -0,0 +1,40 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: shipping-quote + name: 'Shipping: Quote' + description: Quote delivery for one order + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:SHIPPING_ADDR} + method: oteldemo.ShippingService.GetQuote + request: |- + { + "address": { + "streetAddress": "One Microsoft Way", + "city": "Redmond", + "state": "Washington", + "country": "United States", + "zipCode": "98052" + }, + "items": [ + { + "productId": "66VCHSJNUP", + "quantity": 2 + } + ] + } + specs: + - name: It called GetQuote correctly + selector: span[tracetest.span.type="rpc" name="oteldemo.ShippingService/GetQuote" rpc.system="grpc"] + assertions: + - attr:rpc.grpc.status_code = 0 + - name: It returned a valid quote + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.body | json_path '$.costUsd.currencyCode' = "USD" + - attr:tracetest.response.body | json_path '$.costUsd.units' > 0 -- cgit v1.2.3