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/ad | |
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'test/tracetesting/ad')
| -rw-r--r-- | test/tracetesting/ad/all.yaml | 10 | ||||
| -rw-r--r-- | test/tracetesting/ad/get.yaml | 28 |
2 files changed, 38 insertions, 0 deletions
diff --git a/test/tracetesting/ad/all.yaml b/test/tracetesting/ad/all.yaml new file mode 100644 index 0000000..e57c232 --- /dev/null +++ b/test/tracetesting/ad/all.yaml @@ -0,0 +1,10 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: TestSuite +spec: + id: ad-all + name: 'Ad Service' + description: Run all Ad Service tests enabled in sequence + steps: + - ./get.yaml diff --git a/test/tracetesting/ad/get.yaml b/test/tracetesting/ad/get.yaml new file mode 100644 index 0000000..65b0f07 --- /dev/null +++ b/test/tracetesting/ad/get.yaml @@ -0,0 +1,28 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: ad-get-ads + name: 'Ad: get' + description: Get Ads from API + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:AD_ADDR} + method: oteldemo.AdService.GetAds + request: |- + { + "contextKeys": [ "galaxy", "telescope" ] + } + specs: + - name: It returns two ads + selector: span[tracetest.span.type="rpc" name="oteldemo.AdService/GetAds" rpc.system="grpc" rpc.method="GetAds" rpc.service="oteldemo.AdService"] + assertions: + - attr:app.ads.count = 2 + - name: It returns a valid redirectUrl for each ads + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.body | json_path '$.ads[0].redirectUrl' contains "/product/" + - attr:tracetest.response.body | json_path '$.ads[1].redirectUrl' contains "/product/" |
