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/payment/expired-credit-card.yaml | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/tracetesting/payment/expired-credit-card.yaml (limited to 'test/tracetesting/payment/expired-credit-card.yaml') diff --git a/test/tracetesting/payment/expired-credit-card.yaml b/test/tracetesting/payment/expired-credit-card.yaml new file mode 100644 index 0000000..c2f9d5d --- /dev/null +++ b/test/tracetesting/payment/expired-credit-card.yaml @@ -0,0 +1,37 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: payment-expired-credit-card + name: 'Payment: expired credit card' + description: Charge customer with an expired credit card + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:PAYMENT_ADDR} + method: oteldemo.PaymentService.Charge + request: |- + { + "amount": { + "currencyCode": "USD", + "units": 43, + "nanos": 130000000 + }, + "creditCard": { + "creditCardNumber": "4432-8015-6152-0454", + "creditCardCvv": 672, + "creditCardExpirationYear": 2021, + "creditCardExpirationMonth": 1 + } + } + specs: + - name: It should call Charge method and receive a gRPC error + selector: span[tracetest.span.type="rpc" name="grpc.oteldemo.PaymentService/Charge" rpc.system="grpc" rpc.method="Charge" rpc.service="oteldemo.PaymentService"] + assertions: + - attr:grpc.error_message = "The credit card (ending 0454) expired on 1/2021." + - name: It should return a return an gRPC error code to the caller + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.status = 2 -- cgit v1.2.3