mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
repair request logic
This commit is contained in:
parent
39abf370a4
commit
219c2b1038
3 changed files with 9 additions and 10 deletions
|
@ -27,15 +27,11 @@ Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
|||
tests("#modify").succeeds do
|
||||
pending if Fog.mocking?
|
||||
|
||||
engine = rds_default_server_params.fetch(:engine)
|
||||
engine = rds_default_server_params.fetch(:engine)
|
||||
version = rds_default_server_params.fetch(:version).match(/\d+\.\d+/).to_s
|
||||
|
||||
family = "#{engine}#{version}"
|
||||
|
||||
puts family
|
||||
|
||||
orig_parameter_group = @instance.db_parameter_groups.first['DBParameterGroupName']
|
||||
parameter_group = Fog::AWS[:rds].parameter_groups.create(:id => uniq_id, :family => family, :description => 'fog-test')
|
||||
parameter_group = Fog::AWS[:rds].parameter_groups.create(:id => uniq_id, :family => "#{engine}#{version}", :description => 'fog-test')
|
||||
|
||||
orig_security_groups = @instance.db_security_groups.map{|h| h['DBSecurityGroupName']}
|
||||
security_group = Fog::AWS[:rds].security_groups.create(:id => uniq_id, :description => 'fog-test')
|
||||
|
|
|
@ -205,8 +205,7 @@ class AWS
|
|||
}
|
||||
|
||||
REPLICA_INSTANCE = INSTANCE.merge({
|
||||
'BackupRetentionPeriod' => Fog::Nullable::String,
|
||||
'PreferredBackupWindow' => Fog::Nullable::String,
|
||||
'PreferredBackupWindow' => Fog::Nullable::String,
|
||||
'ReadReplicaSourceDBInstanceIdentifier' => String
|
||||
})
|
||||
|
||||
|
|
|
@ -15,13 +15,17 @@ Shindo.tests('AWS::RDS | instance requests', ['aws', 'rds']) do
|
|||
tests("#create_db_instance").formats(AWS::RDS::Formats::CREATE_DB_INSTANCE) do
|
||||
default_params = rds_default_server_params
|
||||
|
||||
# creation of replicas requires a > 0 BackupRetentionPeriod value
|
||||
# InvalidDBInstanceState => Automated backups are not enabled for this database instance. To enable automated backups, use ModifyDBInstance to set the backup retention period to a non-zero value. (Fog::AWS::RDS::Error)
|
||||
backup_retention_period = 1
|
||||
|
||||
result = Fog::AWS[:rds].create_db_instance(@db_instance_id,
|
||||
'AllocatedStorage' => default_params.fetch(:allocated_storage),
|
||||
'DBInstanceClass' => default_params.fetch(:flavor_id),
|
||||
'Engine' => default_params.fetch(:engine),
|
||||
'EngineVersion' => default_params.fetch(:version),
|
||||
'MasterUsername' => default_params.fetch(:master_username),
|
||||
'BackupRetentionPeriod' => default_params.fetch(:backup_retention_period),
|
||||
'BackupRetentionPeriod' => backup_retention_period,
|
||||
'MasterUserPassword' => default_params.fetch(:password)).body
|
||||
|
||||
instance = result['CreateDBInstanceResult']['DBInstance']
|
||||
|
@ -69,7 +73,7 @@ Shindo.tests('AWS::RDS | instance requests', ['aws', 'rds']) do
|
|||
end
|
||||
|
||||
tests("#describe_db_snapshots").formats(AWS::RDS::Formats::DESCRIBE_DB_SNAPSHOTS) do
|
||||
body = Fog::AWS[:rds].describe_db_snapshots.body
|
||||
Fog::AWS[:rds].describe_db_snapshots.body
|
||||
end
|
||||
|
||||
server.wait_for { state == 'available' }
|
||||
|
|
Loading…
Reference in a new issue