Route Tables: Added support for associate/disassociate subnets. (fixed idempotency)
This commit is contained in:
parent
50d74b4811
commit
89fd71eb16
2 changed files with 24 additions and 0 deletions
|
|
@ -177,6 +177,10 @@ def test_route_table_associations():
|
|||
route_table.associations[0].route_table_id.should.equal(route_table.id)
|
||||
route_table.associations[0].subnet_id.should.equal(subnet.id)
|
||||
|
||||
# Associate is idempotent
|
||||
association_id_idempotent = conn.associate_route_table(route_table.id, subnet.id)
|
||||
association_id_idempotent.should.equal(association_id)
|
||||
|
||||
# Error: Attempt delete associated route table.
|
||||
with assert_raises(EC2ResponseError) as cm:
|
||||
conn.delete_route_table(route_table.id)
|
||||
|
|
@ -265,6 +269,10 @@ def test_route_table_replace_route_table_association():
|
|||
route_table2.associations[0].route_table_id.should.equal(route_table2.id)
|
||||
route_table2.associations[0].subnet_id.should.equal(subnet.id)
|
||||
|
||||
# Replace Association is idempotent
|
||||
association_id_idempotent = conn.replace_route_table_association_with_assoc(association_id2, route_table2.id)
|
||||
association_id_idempotent.should.equal(association_id2)
|
||||
|
||||
# Error: Replace association with invalid association ID
|
||||
with assert_raises(EC2ResponseError) as cm:
|
||||
conn.replace_route_table_association_with_assoc("rtbassoc-1234abcd", route_table1.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue