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
/opt/homebrew/Cellar/cloudformation-cli/0.2.35_1/libexec/lib/python3.12/site-packages/rpdk/core/contract/resource_client.py:498: in compare_model
raise AssertionError(assertion_error_message) from exception
E AssertionError: All properties specified in the request MUST be present in the model returned, and they MUST match exactly, with the exception of properties defined as writeOnlyProperties in the resource schema
E Request Model : {'Profile': 'default', 'ProjectId': '65251446ae5f3f6ec7968b13', 'ClusterName': 'Cluster0', 'Specs': [{'InstanceSize': 'S30_HIGHCPU_NVME', 'NodeCount': 3}]}
E Returned Model : {'Profile': 'default', 'ClusterName': 'Cluster0', 'ProjectId': '65251446ae5f3f6ec7968b13', 'Specs': [{'InstanceSize': 'S30_HIGHCPU_NVME', 'NodeCount': '3'}]}
E , inputs: {"Profile": "default", "ProjectId": "65251446ae5f3f6ec7968b13", "ClusterName": "Cluster0", "Specs": [{"InstanceSize": "S30_HIGHCPU_NVME", "NodeCount": 3}]}, outputs: {"Profile": "default", "ClusterName": "Cluster0", "ProjectId": "65251446ae5f3f6ec7968b13", "Specs": [{"InstanceSize": "S30_HIGHCPU_NVME", "NodeCount": "3"}]}
As a workaround, if the input file defines the integer property as a string the compare logic does not fail and contract tests are successful:
The text was updated successfully, but these errors were encountered:
AgustinBettati
changed the title
contract test compare_model assertion error when integer type property is defined as integer literal in input file
Contract test compare_model assertion error when integer property is defined as integer literal in input file
Mar 11, 2024
Command being run
cfn test --function-name TestEntrypoint --verbose
Version
cfn 0.2.35
Resource type schema
Contract test input file
Unexpected error output
As a workaround, if the input file defines the integer property as a string the compare logic does not fail and contract tests are successful:
The text was updated successfully, but these errors were encountered: