From 338439be9b139cc443f4b12a019ba2aa0e2ef975 Mon Sep 17 00:00:00 2001 From: Daniel Baptista Dias Date: Mon, 26 Feb 2024 11:33:37 -0300 Subject: [PATCH] chore: update observability to the rescue example files (#3685) update example files --- .../tracetest/tests/test-with-error.yaml | 29 +++++++++---------- .../tracetest/tests/test-with-success.yaml | 12 ++++---- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/examples/observability-to-the-rescue/tracetest/tests/test-with-error.yaml b/examples/observability-to-the-rescue/tracetest/tests/test-with-error.yaml index dd1aaf439e..b290930fbe 100644 --- a/examples/observability-to-the-rescue/tracetest/tests/test-with-error.yaml +++ b/examples/observability-to-the-rescue/tracetest/tests/test-with-error.yaml @@ -1,33 +1,30 @@ type: Test spec: - id: yWoVaiuVR + id: 7uEPjAoIg name: Your API call with error - description: Test call that will fail on purpose, showing the error propagation problem in the Payment System trigger: type: http httpRequest: - url: http://your-api:10013/executePaymentOrder method: POST + url: http://your-api:10013/executePaymentOrder + body: | + { + "walletId": 4, + "yearsAsACustomer": 0 + } headers: - key: Content-Type value: application/json - body: |- - { - "walletId": 4, - "yearsAsACustomer": 0 - } specs: - - name: Your-API is OK - selector: span[name="POST /executePaymentOrder" http.target="/executePaymentOrder" http.method="POST"] + - selector: span[name="POST /executePaymentOrder" http.target="/executePaymentOrder" http.method="POST"] + name: Your-API is OK assertions: - attr:http.status_code = 200 - - name: Payment-Executor is OK - selector: span[tracetest.span.type="http" name="POST" http.target="/payment/execute" http.method="POST"] + - selector: span[tracetest.span.type="http" name="POST" http.target="/payment/execute" http.method="POST"] + name: Payment-Executor is OK assertions: - attr:http.status_code = 200 - - name: Risk-Analysis API calculation is returning OK - selector: span[name="/computeRisk" http.target="/computeRisk" http.method="POST"] + - selector: span[name="/computeRisk" http.target="/computeRisk" http.method="POST"] + name: Risk-Analysis API calculation is returning OK assertions: - attr:http.status_code = 200 - - diff --git a/examples/observability-to-the-rescue/tracetest/tests/test-with-success.yaml b/examples/observability-to-the-rescue/tracetest/tests/test-with-success.yaml index 18b6502142..bd8a2b6b9b 100644 --- a/examples/observability-to-the-rescue/tracetest/tests/test-with-success.yaml +++ b/examples/observability-to-the-rescue/tracetest/tests/test-with-success.yaml @@ -6,16 +6,16 @@ spec: trigger: type: http httpRequest: - url: http://your-api:10013/executePaymentOrder method: POST + url: http://your-api:10013/executePaymentOrder + body: | + { + "walletId": 4, + "yearsAsACustomer": 1 + } headers: - key: Content-Type value: application/json - body: |- - { - "walletId": 4, - "yearsAsACustomer": 1 - } specs: - name: Your-API is OK selector: span[name="POST /executePaymentOrder" http.target="/executePaymentOrder" http.method="POST"]