如何解决当我看到创建了匹配的资源时,CDK单元测试失败
我的CDK单元测试失败,我试图测试我的参数已正确构建。这是我实际堆栈中的CDK代码
const serviceUrl = StringParameter.valueForStringParameter(
scope,`${StackConfiguration.ParaM}${StackConfiguration.HYPHEN}${StackConfiguration.environmentKey}${StackConfiguration.HYPHEN}${StackConfiguration.SERVICE_URL_ParaM_NAME}`
);
这是我的测试失败
expect(stack).toMatch({
Parameters: {
RefParameter: {
Type: 'AWS::SSM::Parameter::Value<String>',Default: 'myparameter-unit-test-service-url',},});
失败消息
● Test suite Failed to run
Template comparison produced unacceptable match
这是我可以看到的CFT
"SsmParameterValuemyparameterunittestserviceurlC96584B6F00A464EAD1953AFF4B05118Parameter": {
"Type": "AWS::SSM::Parameter::Value<String>","Default": "myparameter-unit-test-service-url"
},
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。