opsworks: impl create_layers; describe_layers
This commit is contained in:
parent
165bab0f97
commit
2fe5b77861
5 changed files with 266 additions and 18 deletions
|
|
@ -1,8 +1,9 @@
|
|||
from __future__ import unicode_literals
|
||||
import boto3
|
||||
import sure # noqa
|
||||
import re
|
||||
|
||||
from moto import mock_opsworks, mock_ec2, mock_elb
|
||||
from moto import mock_opsworks
|
||||
|
||||
|
||||
@mock_opsworks
|
||||
|
|
@ -30,12 +31,18 @@ def test_describe_stacks():
|
|||
|
||||
response = client.describe_stacks()
|
||||
response['Stacks'].should.have.length_of(3)
|
||||
response['Stacks'][0]['ServiceRoleArn'].should.equal("service_arn")
|
||||
response['Stacks'][0]['DefaultInstanceProfileArn'].should.equal("profile_arn")
|
||||
for stack in response['Stacks']:
|
||||
stack['ServiceRoleArn'].should.equal("service_arn")
|
||||
stack['DefaultInstanceProfileArn'].should.equal("profile_arn")
|
||||
|
||||
_id = response['Stacks'][0]['StackId']
|
||||
response = client.describe_stacks(StackIds=[_id])
|
||||
response['Stacks'].should.have.length_of(1)
|
||||
response['Stacks'][0]['Arn'].should.contain(_id)
|
||||
|
||||
# ClientError/ResourceNotFoundException
|
||||
client.describe_stacks.when.called_with(StackIds=["foo"]).should.throw(
|
||||
Exception, re.compile(r'foo')
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue