chore(ecs-service-extensions): migrate tests to assertions#18649
chore(ecs-service-extensions): migrate tests to assertions#18649mergify[bot] merged 2 commits intomasterfrom
Conversation
madeline-k
left a comment
There was a problem hiding this comment.
Looks good, thanks @kaizen3031593!
Adding the do not merge label in case you want to make changes based on the one question I have.
| expect(stack).toHaveResource('AWS::ECS::TaskDefinition'); | ||
|
|
||
|
|
||
| Template.fromStack(stack).hasResource('AWS::ECS::TaskDefinition', Match.anyValue()); |
There was a problem hiding this comment.
This could also be resourceCountIs( , 1). Which one is better?
There was a problem hiding this comment.
So the slight difference here is that resourceCountIs(,1) ensures that there is only 1 resource AWS::ECS::TaskDefinition. I'm 99% sure that when I was migrating, this test had multiple task definitions, which is why I migrated it this way.
Maybe its worth thinking about adding comparisons to resourceCountIs? Something like resourecCountIs(, Match.greaterThan(1)).
There was a problem hiding this comment.
Ah okay, thanks for the explanation. Make sense. I think it's worth opening a feature request to Assertions for this one.
|
|
||
| // Ensure that the log group was created | ||
| expect(stack).toHaveResource('AWS::Logs::LogGroup'); | ||
| Template.fromStack(stack).hasResource('AWS::Logs::LogGroup', Match.anyValue()); |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
* origin/master: (74 commits) chore: remove reliance on `decdk` in build system (aws#18760) chore: add repository directory for all packages.json (aws#17203) docs(ecs): correct comment documentation for NetworkMode (aws#17841) feat(ecs): expose image name in container definition (aws#17793) feat(ecr): add server-side encryption configuration (aws#16966) chore(region-info): ap-southeast-3 (Jakarta) ROUTE_53_BUCKET_WEBSITE_ZONE_ID (aws#18110) chore: reassign njlynch's ownership areas (aws#18751) chore(ecs-service-extensions): migrate tests to assertions (aws#18649) chore(s3): Fixed documentation for `InventoryFormat.ORC` (aws#18717) feat(iot): add Action to republish MQTT messages to another MQTT topic (aws#18661) chore(rds): add support for PostgreSQL 14 (aws#18713) fix(core): correctly reference versionless secure parameters (aws#18730) fix(ec2): `UserData.addSignalOnExitCommand` does not work in combination with `userDataCausesReplacement` (aws#18726) fix(vpc): Vpc.fromLookup should throw if subnet group name tag is explicitly given and does not exist (aws#18714) docs(dynamodb): add note around table encryption (aws#18721) chore: override `markdown-it` version (aws#18723) docs(cfnspec): update CloudFormation documentation (aws#18741) chore(release): 1.142.0 chore(lambda-layer-awscli): contains a CLI version with a CVE (aws#18727) chore(lambda-python): remove Pillow dependency (aws#18722) ...
`assert-internal` is [about to be] deprecated, so we are migrating all cdk modules to assertions. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
assert-internalis [about to be] deprecated, so we are migrating all cdk modules to assertions.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license