Add invalid subnet test.
This commit is contained in:
parent
5bbcc4505f
commit
50b80b68f0
1 changed files with 12 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ from boto.redshift.exceptions import (
|
|||
ClusterParameterGroupNotFound,
|
||||
ClusterSecurityGroupNotFound,
|
||||
ClusterSubnetGroupNotFound,
|
||||
InvalidSubnet,
|
||||
)
|
||||
import sure # noqa
|
||||
|
||||
|
|
@ -305,6 +306,17 @@ def test_create_cluster_subnet_group():
|
|||
set(subnet_ids).should.equal(set([subnet1.id, subnet2.id]))
|
||||
|
||||
|
||||
@mock_redshift
|
||||
@mock_ec2
|
||||
def test_create_invalid_cluster_subnet_group():
|
||||
redshift_conn = boto.connect_redshift()
|
||||
redshift_conn.create_cluster_subnet_group.when.called_with(
|
||||
"my_subnet",
|
||||
"This is my subnet group",
|
||||
subnet_ids=["subnet-1234"],
|
||||
).should.throw(InvalidSubnet)
|
||||
|
||||
|
||||
@mock_redshift
|
||||
def test_describe_non_existant_subnet_group():
|
||||
conn = boto.redshift.connect_to_region("us-east-1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue