integ-tests: broken assertion caused by getAttX
calls
#30477
Labels
@aws-cdk/integ-tests
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Running
getAtt
orgetAttString
on a SDK integration will cause theflattenResults
property to be set, allowing users to retrieve JSONPath-ish property values. However, this also causes assertions for that integration to failExpected Behavior
Given that
flattenResults
is not exposed to the user, they would expect their object/path assertions to work regardless ofgetAttX
calls.Current Behavior
actual
isundefined
:aws-cdk/packages/@aws-cdk/integ-tests-alpha/lib/assertions/providers/lambda-handler/assertion.ts
Line 9 in 8f4d4d7
Reproduction Steps
Output:
Possible Solution
I'm assuming the flattened object is not being sent/parsed properly. Reversion the flattening process in
AssertionHandler
would be satisfactoryAdditional Information/Context
No response
CDK CLI Version
2.144.0
Framework Version
No response
Node.js Version
v20.11.1
OS
macOS 14.4.1
Language
TypeScript
Language Version
No response
Other information
I discovered this issue while attempting to write an integration test for #30361, which implements
flattenResults
for HTTP assertionsThe text was updated successfully, but these errors were encountered: