mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #3158 from fog/3157_fix_hash_style
[GH-3157] Replace 1.9 hashes with Hash rockets
This commit is contained in:
commit
86aff2ac66
1 changed files with 16 additions and 8 deletions
|
@ -19,7 +19,11 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do
|
||||||
end
|
end
|
||||||
|
|
||||||
test('create a FQDN HTTP based health check') do
|
test('create a FQDN HTTP based health check') do
|
||||||
@response = @r53_connection.create_health_check(nil, '80', 'HTTP', fqdn: 'www.amazon.com', resource_path: '/gp/cart/view.html/ref=nav_cart')
|
@options = {
|
||||||
|
:fqdn => "www.amazon.com",
|
||||||
|
:resource_path => "/gp/cart/view.html/ref=nav_cart"
|
||||||
|
}
|
||||||
|
@response = @r53_connection.create_health_check(nil, '80', 'HTTP', @options)
|
||||||
@response.status == 201 &&
|
@response.status == 201 &&
|
||||||
@response.body['HealthCheck']['HealthCheckConfig']['IPAddress'].nil? &&
|
@response.body['HealthCheck']['HealthCheckConfig']['IPAddress'].nil? &&
|
||||||
@response.body['HealthCheck']['HealthCheckConfig']['Port'] == '80' &&
|
@response.body['HealthCheck']['HealthCheckConfig']['Port'] == '80' &&
|
||||||
|
@ -29,11 +33,11 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do
|
||||||
|
|
||||||
tests('get a health check') do
|
tests('get a health check') do
|
||||||
@options = {
|
@options = {
|
||||||
fqdn: 'www.amazon.com',
|
:fqdn => "www.amazon.com",
|
||||||
resource_path: '/gp/cart/view.html/ref=nav_cart',
|
:resource_path => "/gp/cart/view.html/ref=nav_cart",
|
||||||
search_string: 'Amazon',
|
:search_string => "Amazon",
|
||||||
request_interval: 10,
|
:request_interval => 10,
|
||||||
failure_threshold: '7'
|
:failure_threshold => "7"
|
||||||
}
|
}
|
||||||
create_response = @r53_connection.create_health_check('8.8.8.8', '443', 'HTTPS_STR_MATCH', @options)
|
create_response = @r53_connection.create_health_check('8.8.8.8', '443', 'HTTPS_STR_MATCH', @options)
|
||||||
@health_check_id = create_response.body['HealthCheck']['Id']
|
@health_check_id = create_response.body['HealthCheck']['Id']
|
||||||
|
@ -82,7 +86,11 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do
|
||||||
before do
|
before do
|
||||||
response_1 = @r53_connection.create_health_check('8.8.8.8', '53', 'TCP')
|
response_1 = @r53_connection.create_health_check('8.8.8.8', '53', 'TCP')
|
||||||
@health_check_1_id = response_1.body['HealthCheck']['Id']
|
@health_check_1_id = response_1.body['HealthCheck']['Id']
|
||||||
response_2 = @r53_connection.create_health_check(nil, '80', 'HTTP', fqdn: 'www.amazon.com', resource_path: '/gp/cart/view.html/ref=nav_cart')
|
options = {
|
||||||
|
:fqdn => "www.amazon.com",
|
||||||
|
:resource_path => "/gp/cart/view.html/ref=nav_cart"
|
||||||
|
}
|
||||||
|
response_2 = @r53_connection.create_health_check(nil, '80', 'HTTP', options)
|
||||||
@health_check_2_id = response_2.body['HealthCheck']['Id']
|
@health_check_2_id = response_2.body['HealthCheck']['Id']
|
||||||
@health_check_ids = [@health_check_1_id, @health_check_2_id]
|
@health_check_ids = [@health_check_1_id, @health_check_2_id]
|
||||||
end
|
end
|
||||||
|
@ -113,7 +121,7 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do
|
||||||
|
|
||||||
tests('assign a health check to a DNS record') do
|
tests('assign a health check to a DNS record') do
|
||||||
after do
|
after do
|
||||||
@r53_connection.change_resource_record_sets(@zone_id, [@resource_record.merge(action: 'DELETE')])
|
@r53_connection.change_resource_record_sets(@zone_id, [@resource_record.merge(:action => 'DELETE')])
|
||||||
@r53_connection.delete_hosted_zone(@zone_id)
|
@r53_connection.delete_hosted_zone(@zone_id)
|
||||||
@r53_connection.delete_health_check @health_check_id
|
@r53_connection.delete_health_check @health_check_id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue