1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|rds] add tagging tests for RDS server model

This commit is contained in:
Benton Roberts 2012-10-28 23:18:43 -04:00
parent 28216278eb
commit eb96e320b9
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,20 @@
Shindo.tests("AWS::RDS | tagging", ['aws', 'rds']) do
@server = Fog::AWS[:rds].servers.create(rds_default_server_params)
Formatador.display_line "Creating RDS instance #{@server.id}"
Formatador.display_line "Waiting for instance #{@server.id} to be ready"
@server.wait_for { ready? }
tags1 = {'key1' => 'val1'}
tags2 = {'key2' => 'val2'}
tests "add and remove tags from a running RDS model" do
returns({}) { @server.tags }
returns(tags1) { @server.add_tags tags1 }
returns(tags1.merge tags2) { @server.add_tags tags2 }
returns(tags2) { @server.remove_tags tags1.keys }
returns(tags2) { @server.tags }
end
@server.destroy
end

View file

@ -36,7 +36,7 @@ Shindo.tests('AWS::RDS | tagging requests', ['aws', 'rds']) do
tests("#remove_tags_from_resource").formats(AWS::RDS::Formats::BASIC) do
result = @rds.remove_tags_from_resource(
@db_instance_id, [single_tag.keys.first]).body
@db_instance_id, single_tag.keys).body
returns(two_tags) do
@rds.list_tags_for_resource(@db_instance_id).
body['ListTagsForResourceResult']['TagList']