From 6fa16f963ab3dacdf4cd389b1b06e7605715c0cf Mon Sep 17 00:00:00 2001 From: Lukas Fruntke Date: Thu, 27 Jan 2022 17:02:15 +0100 Subject: [PATCH] Revert "fix(pipelines): CodeBuild projects are hard to tell apart (#18492)" This reverts commit f6dab8d8c5aa4cf56d6846e2d13c1d5641136f72. --- .../test/codepipeline/codebuild-step.test.ts | 22 --------- .../integ.newpipeline-with-vpc.expected.json | 48 ------------------- .../test/integ.newpipeline.expected.json | 24 ---------- .../pipelines/test/testhelpers/matchers.ts | 2 +- 4 files changed, 1 insertion(+), 95 deletions(-) diff --git a/packages/@aws-cdk/pipelines/test/codepipeline/codebuild-step.test.ts b/packages/@aws-cdk/pipelines/test/codepipeline/codebuild-step.test.ts index 01069ee7adee0..c905c3cbc4cfa 100644 --- a/packages/@aws-cdk/pipelines/test/codepipeline/codebuild-step.test.ts +++ b/packages/@aws-cdk/pipelines/test/codepipeline/codebuild-step.test.ts @@ -43,28 +43,6 @@ test('additionalinputs creates the right commands', () => { }); }); -test('CodeBuild projects have a description', () => { - new cdkp.CodePipeline(pipelineStack, 'Pipeline', { - synth: new cdkp.CodeBuildStep('Synth', { - commands: ['/bin/true'], - input: cdkp.CodePipelineSource.gitHub('test/test', 'main'), - }), - }); - - // THEN - Template.fromStack(pipelineStack).hasResourceProperties( - 'AWS::CodeBuild::Project', - { - Description: { - 'Fn::Join': [ - '', - ['Pipeline step ', { Ref: 'Pipeline9850B417' }, '/Build/Synth'], - ], - }, - }, - ); -}); - test('long duration steps are supported', () => { // WHEN new cdkp.CodePipeline(pipelineStack, 'Pipeline', { diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json index a3f12aa278c48..87c85c72f72e4 100644 --- a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-vpc.expected.json @@ -1363,18 +1363,6 @@ "Cache": { "Type": "NO_CACHE" }, - "Description": { - "Fn::Join": [ - "", - [ - "Pipeline step ", - { - "Ref": "Pipeline9850B417" - }, - "/Build/Synth" - ] - ] - }, "EncryptionKey": "alias/aws/s3", "VpcConfig": { "SecurityGroupIds": [ @@ -1962,18 +1950,6 @@ "Cache": { "Type": "NO_CACHE" }, - "Description": { - "Fn::Join": [ - "", - [ - "Pipeline step ", - { - "Ref": "Pipeline9850B417" - }, - "/UpdatePipeline/SelfMutate" - ] - ] - }, "EncryptionKey": "alias/aws/s3", "VpcConfig": { "SecurityGroupIds": [ @@ -2316,18 +2292,6 @@ "Cache": { "Type": "NO_CACHE" }, - "Description": { - "Fn::Join": [ - "", - [ - "Pipeline step ", - { - "Ref": "Pipeline9850B417" - }, - "/Assets/FileAsset1" - ] - ] - }, "EncryptionKey": "alias/aws/s3", "VpcConfig": { "SecurityGroupIds": [ @@ -2429,18 +2393,6 @@ "Cache": { "Type": "NO_CACHE" }, - "Description": { - "Fn::Join": [ - "", - [ - "Pipeline step ", - { - "Ref": "Pipeline9850B417" - }, - "/Assets/FileAsset2" - ] - ] - }, "EncryptionKey": "alias/aws/s3", "VpcConfig": { "SecurityGroupIds": [ diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json index 47c1f4d129631..3ae3fe487e81d 100644 --- a/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json @@ -2044,18 +2044,6 @@ "Cache": { "Type": "NO_CACHE" }, - "Description": { - "Fn::Join": [ - "", - [ - "Pipeline step ", - { - "Ref": "Pipeline9850B417" - }, - "/Build/Synth" - ] - ] - }, "EncryptionKey": "alias/aws/s3" } }, @@ -2355,18 +2343,6 @@ "Cache": { "Type": "NO_CACHE" }, - "Description": { - "Fn::Join": [ - "", - [ - "Pipeline step ", - { - "Ref": "Pipeline9850B417" - }, - "/UpdatePipeline/SelfMutate" - ] - ] - }, "EncryptionKey": "alias/aws/s3" } } diff --git a/packages/@aws-cdk/pipelines/test/testhelpers/matchers.ts b/packages/@aws-cdk/pipelines/test/testhelpers/matchers.ts index f7ba6458f7449..97a02fc1dc10d 100644 --- a/packages/@aws-cdk/pipelines/test/testhelpers/matchers.ts +++ b/packages/@aws-cdk/pipelines/test/testhelpers/matchers.ts @@ -26,7 +26,7 @@ class StringLike extends Matcher { public test(actual: any): MatchResult { if (typeof(actual) !== 'string') { - throw new Error(`Expected string but found ${typeof(actual)} ${JSON.stringify(actual)}`); + throw new Error(`Expected string but found ${typeof(actual)}`); } const re = new RegExp(`^${this.pattern.split('*').map(escapeRegex).join('.*')}$`);