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

[rds] prevent final snapshot on replicas

* `InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a replica instance`
This commit is contained in:
Josh Lane 2015-03-19 12:50:35 -07:00
parent f3e6d93e19
commit c00a5f428b
3 changed files with 25 additions and 17 deletions

View file

@ -1,7 +1,4 @@
Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
# Disabled due to https://github.com/fog/fog/1546
pending
model_tests(Fog::AWS[:rds].servers, rds_default_server_params) do
# We'll need this later; create it early to avoid waiting
@instance_with_final_snapshot = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test"), :backup_retention_period => 1))
@ -89,6 +86,10 @@ Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
returns(@instance_with_final_snapshot.id) { replica.read_replica_source }
replica.wait_for { ready? }
# FinalDBSnapshotIdentifier can not be specified when deleting a replica instance
raises(Fog::AWS::RDS::Error) { replica.destroy("foobar") }
replica.destroy
end