chore(servicecatalog): cleanup unit tests for TagOptions#18672
chore(servicecatalog): cleanup unit tests for TagOptions#18672mergify[bot] merged 2 commits intoaws:masterfrom
Conversation
We implemented TagOptions as a full construct, and created its own unit test suite. We are moving some of the basic validation tests out of the other resources unit tests, and then the cross resource association tests as well. The only TagOption tests that remain in portfolio/product are for testing the association and adding as a prop, validation and multi resource tests will be in the `tag-option` test suite.
| Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); | ||
| }), | ||
|
|
||
| test('fails to create and then add tag options with invalid minimum key length', () => { |
There was a problem hiding this comment.
see
aws-cdk/packages/@aws-cdk/aws-servicecatalog/test/tag-option.test.ts
Lines 26 to 34 in 9940952
| test('fails to create and then add tag options with invalid maxium key length', () => { | ||
| expect(() => { | ||
| const tagOptions = new servicecatalog.TagOptions(stack, 'TagOptions', { | ||
| allowedValuesForTags: { | ||
| ['key1'.repeat(1000)]: ['value1', 'value2'], | ||
| key2: ['value1'], | ||
| }, | ||
| }); |
There was a problem hiding this comment.
see
aws-cdk/packages/@aws-cdk/aws-servicecatalog/test/tag-option.test.ts
Lines 36 to 44 in 9940952
| test('fails to create and then add tag options with invalid value length', () => { | ||
| expect(() => { | ||
| const tagOptions = new servicecatalog.TagOptions(stack, 'TagOptions', { | ||
| allowedValuesForTags: { | ||
| key1: ['value1'.repeat(1000), 'value2'], | ||
| key2: ['value1'], | ||
| }, | ||
| }); | ||
| portfolio.associateTagOptions(tagOptions); | ||
| }).toThrowError(/Invalid TagOption value for resource/); |
There was a problem hiding this comment.
see
aws-cdk/packages/@aws-cdk/aws-servicecatalog/test/tag-option.test.ts
Lines 46 to 54 in 9940952
skinny85
left a comment
There was a problem hiding this comment.
Nice! Much tidier and easier to review than putting everything into one PR. I hope you agree 🙂.
|
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). |
We implemented TagOptions as a full construct, and created its own unit test suite. We are moving some of the basic validation tests out of the other resources unit tests, and then the cross resource association tests as well. The only TagOption tests that remain in portfolio/product are for testing the association and adding as a prop, validation and multi resource tests will be in the `tag-option` test suite. The removed validation tests are already in the `tag-option` test suite. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We implemented TagOptions as a full construct, and created its own unit test suite. We are moving
some of the basic validation tests out of the other resources unit tests, and then the cross resource association
tests as well. The only TagOption tests that remain in portfolio/product are for testing the association and adding
as a prop, validation and multi resource tests will be in the
tag-optiontest suite.The removed validation tests are already in the
tag-optiontest suite.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license