1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/aws/requests/rds/parameter_request_tests.rb

36 lines
1.3 KiB
Ruby
Raw Normal View History

2011-02-27 16:09:12 -05:00
Shindo.tests('AWS::RDS | parameter requests', ['aws', 'rds']) do
tests('success') do
pending if Fog.mocking?
AWS[:rds].create_db_parameter_group('fog-group', 'MySQL5.1', 'Some description')
tests('#modify_db_parameter_group').formats(AWS::RDS::Formats::MODIFY_PARAMETER_GROUP) do
body = AWS[:rds].modify_db_parameter_group('fog-group',[
{'ParameterName' => 'query_cache_size',
'ParameterValue' => '12345',
'ApplyMethod' => 'immediate'}
]).body
body
end
tests('#describe_db_parameters').formats(AWS::RDS::Formats::DESCRIBE_DB_PARAMETERS) do
AWS[:rds].describe_db_parameters('fog-group', :max_records => 20).body
end
tests("#describe_db_parameters :source => 'user'")do
body = AWS[:rds].describe_db_parameters('fog-group', :source => 'user').body
returns(1){ body['DescribeDBParametersResult']['Parameters'].length}
param = body['DescribeDBParametersResult']['Parameters'].first
returns('query_cache_size'){param['ParameterName']}
returns('12345'){param['ParameterValue']}
returns(true){param['IsModifiable']}
returns('query_cache_size'){param['ParameterName']}
end
AWS[:rds].delete_db_parameter_group('fog-group')
end
end