bug fixes: subnets listing, icons resizing and some shenanigans
This commit is contained in:
@@ -216,6 +216,17 @@ describe('PUT /instances/:id/security-groups', () => {
|
||||
expect(res.status).toBe(200)
|
||||
expect(receivedGroupIds).toEqual(['sg-123'])
|
||||
})
|
||||
|
||||
test('rejects an empty selection', async () => {
|
||||
const res = await app.request('/instances/i-test1/security-groups', {
|
||||
method: 'PUT',
|
||||
headers: {'content-type': 'application/json'},
|
||||
body: JSON.stringify({groupIds: []}),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(400)
|
||||
expect(await res.json()).toEqual({error: 'At least one security group is required'})
|
||||
})
|
||||
})
|
||||
|
||||
describe('POST /amis/:imageId/deregister', () => {
|
||||
|
||||
Reference in New Issue
Block a user