2015-01-02 12:34:40 -05:00
|
|
|
Shindo.tests("AWS::RDS | servers", ['aws', 'rds']) do
|
2014-12-30 17:25:09 -05:00
|
|
|
|
|
|
|
collection_tests(Fog::AWS[:rds].servers, rds_default_server_params) do
|
|
|
|
@instance.wait_for { ready? }
|
|
|
|
end
|
2015-07-10 21:25:26 -04:00
|
|
|
|
|
|
|
tests("#restore").succeeds do
|
|
|
|
instance = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test")))
|
|
|
|
|
|
|
|
snapshot_id = uniq_id('fog-snapshot-test')
|
|
|
|
@snapshot = instance.snapshots.create(:id => snapshot_id )
|
|
|
|
instance.destroy
|
|
|
|
|
|
|
|
db_name = uniq_id('fog-db-name')
|
2016-01-19 12:06:54 -05:00
|
|
|
@restore_instance = Fog::AWS[:rds].servers.restore('master_username' => instance.master_username, 'flavor_id' => 'db.m3.medium', 'source_snapshot_id' => snapshot_id, 'id' => uniq_id('restored-instance'))
|
2015-07-10 21:25:26 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
if Fog.mocking? && @restore_instance.respond_to?(:ready?)
|
|
|
|
@restore_instance.wait_for { ready? }
|
|
|
|
end
|
|
|
|
|
|
|
|
@snapshot.destroy
|
|
|
|
@restore_instance.destroy
|
2014-12-30 17:25:09 -05:00
|
|
|
end
|