Expose contextual data when Lambda test fails (#3590)

This test is flaky, but when it fails we don't get any indication as to why.
This commit ensures that the reason for failure will be part of the assertion
message.

Once we have information about why this test fails, we can troubleshoot further
and hopefully come up with a permanent fix.
This commit is contained in:
Brian Pandola 2021-01-15 06:42:35 -08:00 committed by GitHub
parent c1180d6e45
commit 7ff60683e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,9 @@ def test_invoke_requestresponse_function():
LogType="Tail",
)
if "FunctionError" in success_result:
assert False, success_result["Payload"].read().decode("utf-8")
success_result["StatusCode"].should.equal(200)
logs = base64.b64decode(success_result["LogResult"]).decode("utf-8")