Skip to content

Commit

Permalink
test(aws-codepipeline-actions-bitbucket): add test case to check gran…
Browse files Browse the repository at this point in the history
…ting s3:putObjectAcl to the codebuild-pipeline with bitbucket
  • Loading branch information
BLasan committed Mar 22, 2021
1 parent 7c705f4 commit 6a6d739
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,51 @@ nodeunitShim({
test.done();
},

'setting codeBuildCloneOutput=true adds s3 put object ACL permission to use the connection to the following CodeBuild Project'(test: Test) {
const stack = new Stack();

createBitBucketAndCodeBuildPipeline(stack, {
codeBuildCloneOutput: true,
});

expect(stack).to(haveResourceLike('AWS::IAM::Policy', {
'PolicyDocument': {
'Statement': [
{
"Action": "s3:PutObjectAcl",
"Effect": "Allow",
"Resource": {
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"PipelineArtifactsBucket22248F97",
"Arn"
]
},
"/*"
],

]
}
},
{},
{},
{},
{},
{
'Action': 'codestar-connections:UseConnection',
'Effect': 'Allow',
'Resource': 'arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh',
},
],
},
}));

test.done();
},

'setting triggerOnPush=false reflects in the configuration'(test: Test) {
const stack = new Stack();

Expand Down

0 comments on commit 6a6d739

Please sign in to comment.