File tree Expand file tree Collapse file tree 2 files changed +2
-30
lines changed
__tests__/integration/common/custom-role Expand file tree Collapse file tree 2 files changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,8 @@ plugins:
1111
1212custom :
1313 apiGatewayServiceProxies :
14- - sqs :
15- path : /sqs
16- method : post
17- queueName : { 'Fn::GetAtt': ['SQSQueue', 'QueueName'] }
18- cors : true
19-
2014 - s3 :
21- path : /s3/{key}
15+ path : /s3-custom-role /{key}
2216 method : post
2317 action : PutObject
2418 bucket :
@@ -31,8 +25,6 @@ custom:
3125
3226resources :
3327 Resources :
34- SQSQueue :
35- Type : ' AWS::SQS::Queue'
3628 S3Bucket :
3729 Type : ' AWS::S3::Bucket'
3830 CustomS3Role :
Original file line number Diff line number Diff line change @@ -29,28 +29,8 @@ describe('Proxy With Custom Role Integration Test', () => {
2929 removeService ( stage , config )
3030 } )
3131
32- it ( 'should get correct response from sqs proxy endpoint with default role' , async ( ) => {
33- const testEndpoint = `${ endpoint } /sqs`
34-
35- const response = await fetch ( testEndpoint , {
36- method : 'POST' ,
37- headers : { 'Content-Type' : 'application/json' } ,
38- body : JSON . stringify ( { message : 'testtest' } )
39- } )
40- expect ( response . headers . get ( 'access-control-allow-origin' ) ) . to . deep . equal ( '*' )
41- expect ( response . status ) . to . be . equal ( 200 )
42- const body = await response . json ( )
43- expect ( body . SendMessageResponse . SendMessageResult ) . to . have . own . property (
44- 'MD5OfMessageAttributes'
45- )
46- expect ( body . SendMessageResponse . SendMessageResult ) . to . have . own . property ( 'MD5OfMessageBody' )
47- expect ( body . SendMessageResponse . SendMessageResult ) . to . have . own . property ( 'MessageId' )
48- expect ( body . SendMessageResponse . SendMessageResult ) . to . have . own . property ( 'SequenceNumber' )
49- expect ( body . SendMessageResponse . ResponseMetadata ) . to . have . own . property ( 'RequestId' )
50- } )
51-
5232 it ( 'should get correct response from s3 proxy endpoint with custom role' , async ( ) => {
53- const testEndpoint = `${ endpoint } /s3/${ key } `
33+ const testEndpoint = `${ endpoint } /s3-custom-role /${ key } `
5434
5535 const response = await fetch ( testEndpoint , {
5636 method : 'POST' ,
You can’t perform that action at this time.
0 commit comments