# Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 type: Test spec: id: payment-amex-credit-card-not-allowed name: 'Payment: Amex credit card not allowed' description: Charge customer with an Amex credit card trigger: type: grpc grpc: protobufFile: ../../../pb/demo.proto address: ${env:PAYMENT_SERVICE_ADDR} method: oteldemo.PaymentService.Charge request: |- { "amount": { "currencyCode": "USD", "units": 43, "nanos": 130000000 }, "creditCard": { "creditCardNumber": "3714 496353 98431", "creditCardCvv": 672, "creditCardExpirationYear": 2039, "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 = "Sorry, we cannot process amex credit cards. Only VISA or MasterCard is accepted." - 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