summaryrefslogtreecommitdiff
path: root/test/tracetesting/product-catalog/list.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/product-catalog/list.yaml
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'test/tracetesting/product-catalog/list.yaml')
-rw-r--r--test/tracetesting/product-catalog/list.yaml26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/tracetesting/product-catalog/list.yaml b/test/tracetesting/product-catalog/list.yaml
new file mode 100644
index 0000000..92adadb
--- /dev/null
+++ b/test/tracetesting/product-catalog/list.yaml
@@ -0,0 +1,26 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+type: Test
+spec:
+ id: product-list
+ name: 'Product: List'
+ description: List all products available on product catalog
+ trigger:
+ type: grpc
+ grpc:
+ protobufFile: ../../../pb/demo.proto
+ address: ${var:PRODUCT_CATALOG_ADDR}
+ method: oteldemo.ProductCatalogService.ListProducts
+ request: ""
+ specs:
+ - name: It queried the product catalog correctly
+ selector: span[tracetest.span.type="rpc" name="oteldemo.ProductCatalogService/ListProducts"
+ rpc.system="grpc" rpc.method="ListProducts" rpc.service="oteldemo.ProductCatalogService"]
+ assertions:
+ - attr:rpc.grpc.status_code = 0
+ - attr:app.products.count = 10
+ - name: It returned products with IDs
+ selector: span[tracetest.span.type="general" name="Tracetest trigger"]
+ assertions:
+ - attr:tracetest.response.body | json_path '$.products[*].id' != ""