Trying to improve coverage
This commit is contained in:
parent
b29fd4a997
commit
e35d99ff09
9
file.tmp
Normal file
9
file.tmp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
AWSTemplateFormatVersion: '2010-09-09'
|
||||||
|
Description: Simple CloudFormation Test Template
|
||||||
|
Resources:
|
||||||
|
S3Bucket:
|
||||||
|
Type: AWS::S3::Bucket
|
||||||
|
Properties:
|
||||||
|
AccessControl: PublicRead
|
||||||
|
BucketName: cf-test-bucket-1
|
@ -323,6 +323,54 @@ def test_create_job_queue():
|
|||||||
resp.should.contain('jobQueues')
|
resp.should.contain('jobQueues')
|
||||||
len(resp['jobQueues']).should.equal(0)
|
len(resp['jobQueues']).should.equal(0)
|
||||||
|
|
||||||
|
# Create job queue which already exists
|
||||||
|
try:
|
||||||
|
resp = batch_client.create_job_queue(
|
||||||
|
jobQueueName='test_job_queue',
|
||||||
|
state='ENABLED',
|
||||||
|
priority=123,
|
||||||
|
computeEnvironmentOrder=[
|
||||||
|
{
|
||||||
|
'order': 123,
|
||||||
|
'computeEnvironment': arn
|
||||||
|
},
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
except ClientError as err:
|
||||||
|
err.response['Error']['Code'].should.equal('ClientException')
|
||||||
|
|
||||||
|
|
||||||
|
# Create job queue with incorrect state
|
||||||
|
try:
|
||||||
|
resp = batch_client.create_job_queue(
|
||||||
|
jobQueueName='test_job_queue2',
|
||||||
|
state='JUNK',
|
||||||
|
priority=123,
|
||||||
|
computeEnvironmentOrder=[
|
||||||
|
{
|
||||||
|
'order': 123,
|
||||||
|
'computeEnvironment': arn
|
||||||
|
},
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
except ClientError as err:
|
||||||
|
err.response['Error']['Code'].should.equal('ClientException')
|
||||||
|
|
||||||
|
# Create job queue with no compute env
|
||||||
|
try:
|
||||||
|
resp = batch_client.create_job_queue(
|
||||||
|
jobQueueName='test_job_queue3',
|
||||||
|
state='JUNK',
|
||||||
|
priority=123,
|
||||||
|
computeEnvironmentOrder=[
|
||||||
|
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
except ClientError as err:
|
||||||
|
err.response['Error']['Code'].should.equal('ClientException')
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
@mock_ecs
|
@mock_ecs
|
||||||
@ -397,6 +445,17 @@ def test_update_job_queue():
|
|||||||
len(resp['jobQueues']).should.equal(1)
|
len(resp['jobQueues']).should.equal(1)
|
||||||
resp['jobQueues'][0]['priority'].should.equal(5)
|
resp['jobQueues'][0]['priority'].should.equal(5)
|
||||||
|
|
||||||
|
batch_client.update_job_queue(
|
||||||
|
jobQueue='test_job_queue',
|
||||||
|
priority=5
|
||||||
|
)
|
||||||
|
|
||||||
|
resp = batch_client.describe_job_queues()
|
||||||
|
resp.should.contain('jobQueues')
|
||||||
|
len(resp['jobQueues']).should.equal(1)
|
||||||
|
resp['jobQueues'][0]['priority'].should.equal(5)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
@mock_ecs
|
@mock_ecs
|
||||||
|
Loading…
Reference in New Issue
Block a user