Skip to content

Commit 5378205

Browse files
committed
test: remove redundant test in custom role spec
1 parent da0cc35 commit 5378205

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

__tests__/integration/common/custom-role/service/serverless.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,8 @@ plugins:
1111

1212
custom:
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

3226
resources:
3327
Resources:
34-
SQSQueue:
35-
Type: 'AWS::SQS::Queue'
3628
S3Bucket:
3729
Type: 'AWS::S3::Bucket'
3830
CustomS3Role:

__tests__/integration/common/custom-role/tests.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff 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',

0 commit comments

Comments
 (0)