tests/aws/models/rds/server_tests.rb in fog-1.9.0 vs tests/aws/models/rds/server_tests.rb in fog-1.10.0
- old
+ new
@@ -1,6 +1,8 @@
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))
@@ -15,13 +17,12 @@
tests('#create').succeeds do
snapshot = @instance.snapshots.create(:id => 'fog-test-snapshot')
end
- snapshot.wait_for {ready?}
+ snapshot.wait_for { ready?}
- @instance.reload
@instance.wait_for { ready? }
returns(true) { @instance.snapshots.map{|s| s.id}.include?(snapshot.id) }
snapshot.destroy
end
@@ -39,34 +40,34 @@
'DBParameterGroupName' => parameter_group.id,
'DBSecurityGroups' => orig_security_groups + [security_group.id]
}
@instance.modify(true, modify_options)
- @instance.reload
+ @instance.wait_for { ready? }
returns(parameter_group.id, 'new parameter group') do
@instance.db_parameter_groups.first['DBParameterGroupName']
end
returns(true, "new security group") do
@instance.db_security_groups.any?{|hash| hash['DBSecurityGroupName'] == security_group.id}
end
@instance.reboot
- @instance.reload.wait_for { state == 'rebooting' }
- @instance.reload.wait_for { ready? }
+ @instance.wait_for { state == 'rebooting' }
+ @instance.wait_for { ready? }
# Restore back to original state using symbols
restore_options = {
:parameter_group_name => orig_parameter_group,
:security_group_names => orig_security_groups
}
@instance.modify(true, restore_options)
@instance.reboot
- @instance.reload.wait_for { state == 'rebooting' }
- @instance.reload.wait_for do
+ @instance.wait_for { state == 'rebooting' }
+ @instance.wait_for do
ready? &&
db_security_groups.all? {|hash| hash['Status'] == 'active'} &&
db_parameter_groups.all? {|hash| hash['ParameterApplyStatus'] == 'in-sync' }
end
@@ -75,11 +76,11 @@
end
tests("#reboot").succeeds do
@instance.reboot
end
- @instance.reload.wait_for {state == 'rebooting'}
- @instance.reload.wait_for { ready? }
+ @instance.wait_for { state == 'rebooting' }
+ @instance.wait_for { ready? }
tests('#create_read_replica').succeeds do
replica = @instance_with_final_snapshot.create_read_replica(uniq_id('fog-replica'))
@instance_with_final_snapshot.reload