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/product-catalog/search.yaml | |
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'test/tracetesting/product-catalog/search.yaml')
| -rw-r--r-- | test/tracetesting/product-catalog/search.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/tracetesting/product-catalog/search.yaml b/test/tracetesting/product-catalog/search.yaml new file mode 100644 index 0000000..fe211b8 --- /dev/null +++ b/test/tracetesting/product-catalog/search.yaml @@ -0,0 +1,28 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: product-search + name: 'Product: Search' + description: Search for products querying for their names + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:PRODUCT_CATALOG_ADDR} + method: oteldemo.ProductCatalogService.SearchProducts + request: |- + { + "query": "Roof Binoculars" + } + specs: + - name: It called SearchProducts correctly and it returned 1 item + selector: span[tracetest.span.type="rpc" name="oteldemo.ProductCatalogService/SearchProducts" rpc.system="grpc" rpc.method="SearchProducts" rpc.service="oteldemo.ProductCatalogService"] + assertions: + - attr:app.products_search.count = 1 + - attr:rpc.grpc.status_code = 0 + - name: It returned the desired product + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.body | json_path '$.results[0].name' = "Roof Binoculars" |
