-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathconvert.yaml
34 lines (33 loc) · 1.05 KB
/
convert.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
type: Test
spec:
id: currency-convert
name: 'Currency: Convert'
description: Convert a currency
trigger:
type: grpc
grpc:
protobufFile: ../../../pb/demo.proto
address: ${var:CURRENCY_SERVICE_ADDR}
method: oteldemo.CurrencyService.Convert
request: |-
{
"from": {
"currencyCode": "USD",
"units": 330,
"nanos": 750000000
},
"toCode": "CAD"
}
specs:
- name: It converts from USD to CAD
selector: span[tracetest.span.type="rpc" name="CurrencyService/Convert" rpc.system="grpc"
rpc.method="Convert" rpc.service="oteldemo.CurrencyService"]
assertions:
- attr:app.currency.conversion.from = "USD"
- attr:app.currency.conversion.to = "CAD"
- name: It has more nanos than expected
selector: span[tracetest.span.type="general" name="Tracetest trigger"]
assertions:
- attr:tracetest.response.body| json_path '$.nanos' >= 599380800