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.
  • Loading branch information
skinny85 committed Nov 2, 2018
1 parent d09d30c commit 92fd1cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
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
13 changes: 13 additions & 0 deletions packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,19 @@ export = {
}
},

'setting timeout when creating a Project sets the TimeoutInMinutes CFN property'(test: Test) {
const stack = new cdk.Stack();
new codebuild.Project(stack, 'Project', {
timeout: 123,
});

expect(stack).to(haveResource('AWS::CodeBuild::Project', {
"TimeoutInMinutes": 123,
}));

test.done();
},

'artifacts': {
'CodePipeline': {
'both source and artifacs are set to CodePipeline'(test: Test) {
Expand Down

0 comments on commit 92fd1cd

Please sign in to comment.