Skip to content

Commit

Permalink
fix(aws-codebuild): correctly pass the timeout property to CFN when c…
Browse files Browse the repository at this point in the history
…reating a Project. (#1071)
  • Loading branch information
skinny85 authored Nov 5, 2018
1 parent f32cba9 commit b1322bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-codebuild/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ export class Project extends ProjectRef {
badgeEnabled: props.badge,
cache,
name: props.projectName,
timeoutInMinutes: props.timeout,
});

this.projectArn = resource.projectArn;
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ export = {
}
},

'using path in S3 artifacts sets it correctly'(test: Test) {
'using timeout and path in S3 artifacts sets it correctly'(test: Test) {
const stack = new cdk.Stack();
const bucket = new s3.Bucket(stack, 'Bucket');
new codebuild.Project(stack, 'Project', {
Expand All @@ -475,6 +475,7 @@ export = {
name: 'some_name',
bucket,
}),
timeout: 123,
});

expect(stack).to(haveResource('AWS::CodeBuild::Project', {
Expand All @@ -483,6 +484,7 @@ export = {
"Name": "some_name",
"Type": "S3",
},
"TimeoutInMinutes": 123,
}));

test.done();
Expand Down

0 comments on commit b1322bb

Please sign in to comment.