Skip to content

Commit

Permalink
fix(codebuild): ReportGroup name is ignored (#11080)
Browse files Browse the repository at this point in the history
Closes #11052

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
AnderEnder authored Oct 24, 2020
1 parent a6439a1 commit 1e2250a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-codebuild/lib/report-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export class ReportGroup extends ReportGroupBase {
}
: undefined,
},
name: props.reportGroupName,
});
resource.applyRemovalPolicy(props.removalPolicy, {
default: cdk.RemovalPolicy.RETAIN,
Expand Down
14 changes: 14 additions & 0 deletions packages/@aws-cdk/aws-codebuild/test/test.report-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ export = {
test.done();
},

'can be created with name' (test: Test) {
const stack = new cdk.Stack();

new codebuild.ReportGroup(stack, 'ReportGroup', {
reportGroupName: 'my-report-group',
});

expect(stack).to(haveResourceLike('AWS::CodeBuild::ReportGroup', {
"Name": 'my-report-group',
}));

test.done();
},

'can be imported by name'(test: Test) {
const stack = new cdk.Stack();

Expand Down

0 comments on commit 1e2250a

Please sign in to comment.