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:
11
11
12
12
custom :
13
13
apiGatewayServiceProxies :
14
- - sqs :
15
- path : /sqs
16
- method : post
17
- queueName : { 'Fn::GetAtt': ['SQSQueue', 'QueueName'] }
18
- cors : true
19
-
20
14
- s3 :
21
- path : /s3/{key}
15
+ path : /s3-custom-role /{key}
22
16
method : post
23
17
action : PutObject
24
18
bucket :
@@ -31,8 +25,6 @@ custom:
31
25
32
26
resources :
33
27
Resources :
34
- SQSQueue :
35
- Type : ' AWS::SQS::Queue'
36
28
S3Bucket :
37
29
Type : ' AWS::S3::Bucket'
38
30
CustomS3Role :
Original file line number Diff line number Diff line change @@ -29,28 +29,8 @@ describe('Proxy With Custom Role Integration Test', () => {
29
29
removeService ( stage , config )
30
30
} )
31
31
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
-
52
32
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 } `
54
34
55
35
const response = await fetch ( testEndpoint , {
56
36
method : 'POST' ,
You can’t perform that action at this time.
0 commit comments