Skip to content

Commit

Permalink
chore: update observability to the rescue example files (#3685)
Browse files Browse the repository at this point in the history
update example files
  • Loading branch information
danielbdias committed Feb 26, 2024
1 parent d19b5cd commit 338439b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
@@ -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


Expand Up @@ -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"]
Expand Down

0 comments on commit 338439b

Please sign in to comment.