You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now, the tests framework has a requirement that the output must match exactly. This makes it difficult for outputs that may have varying data or server-side data that is randomly generated.
wick test pangea_api.wick
2023-08-04T15:06:19 INFO invoke entity=wick://__local__/ip_geolocate
1..1 # Test
# (test name='test_ip', operation='ip_geolocate')
not ok 1 (test name='test_ip', operation='ip_geolocate'): payload data mismatch
# Actual Invocation Output (as JSON):
# {"payload":{"value":{"headers":{"access-control-allow-headers":["*"],"access-control-allow-methods":["*"],"access-control-allow-origin":["*"],"access-control-max-age":["86400"],"content-length":["370"],"content-type":["application/json"],"date":["Fri, 04 Aug 2023 15:06:19 GMT"],"server":["Pangea API Server"],"set-cookie":["AWSALB=UamaOPTc3UU8oKTHS5C1HIVmBYCu7M+sbOTTj+c3JbIt0yANRaD5BNVZyOd3hHjymFYgGC6LLl8ohxg/IePnOFMtcka+5UuwjADocWeEFIyVamcZd4CdFYZccbL1; Expires=Fri, 11 Aug 2023 15:06:19 GMT; Path=/","AWSALBCORS=UamaOPTc3UU8oKTHS5C1HIVmBYCu7M+sbOTTj+c3JbIt0yANRaD5BNVZyOd3hHjymFYgGC6LLl8ohxg/IePnOFMtcka+5UuwjADocWeEFIyVamcZd4CdFYZccbL1; Expires=Fri, 11 Aug 2023 15:06:19 GMT; Path=/; SameSite=None; Secure"],"x-pangea-server-id":["80a01cca-06f9-4dc2-8e29-77ea7da23156"],"x-ratelimit-limit":["1500"],"x-ratelimit-remaining":["1499"],"x-ratelimit-reset":["0"],"x-request-id":["prq_a7gtm3fpflrujohiqr6mgvifhptzd6jq"]},"status":"200","version":"2.0"}},"port":"response"}
# {"flags":128,"port":"response"}
# {"payload":{"value":{"request_id":"prq_a7gtm3fpflrujohiqr6mgvifhptzd6jq","request_time":"2023-08-04T15:06:19.385402Z","response_time":"2023-08-04T15:06:19.400364Z","result":{"data":{"city":"liepaja","country":"Republic Of Latvia","country_code":"lv","latitude":56.51,"longitude":21.01,"postal_code":"lv-3401"}},"status":"Success","summary":"IP location found (Country: Republic Of Latvia)"}},"port":"body"}
# {"flags":128,"port":"body"}
Propose a solution
Tests should have an additional section other than outputs. outputs can continue to work (as an optional) and it evaluates the exact match for the returned output.
The new section should be called asserts. This section can allow for evaluating certain elements of the output object.
Is your feature request related to a problem? Please describe.
Right now, the tests framework has a requirement that the output must match exactly. This makes it difficult for outputs that may have varying data or server-side data that is randomly generated.
Propose a solution
Tests should have an additional section other than
outputs
.outputs
can continue to work (as an optional) and it evaluates the exact match for the returned output.The new section should be called
asserts
. This section can allow for evaluating certain elements of the output object.Operators can be:
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: