From dc47c185d2e963213093635f6f2579cc6d3baf48 Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Fri, 12 Sep 2014 12:07:37 +0100 Subject: [PATCH 1/2] [GH-3157] Replace 1.9 hashes with Hash rockets Tests failing on 1.8 for this (among other reasons) --- tests/aws/requests/dns/health_check_tests.rb | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/aws/requests/dns/health_check_tests.rb b/tests/aws/requests/dns/health_check_tests.rb index b054edda4..994182587 100644 --- a/tests/aws/requests/dns/health_check_tests.rb +++ b/tests/aws/requests/dns/health_check_tests.rb @@ -19,7 +19,11 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do end 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.body['HealthCheck']['HealthCheckConfig']['IPAddress'].nil? && @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 @options = { - fqdn: 'www.amazon.com', - resource_path: '/gp/cart/view.html/ref=nav_cart', - search_string: 'Amazon', - request_interval: 10, - failure_threshold: '7' + :fqdn => "www.amazon.com", + :resource_path => "/gp/cart/view.html/ref=nav_cart", + :search_string => "Amazon", + :request_interval => 10, + :failure_threshold => "7" } create_response = @r53_connection.create_health_check('8.8.8.8', '443', 'HTTPS_STR_MATCH', @options) @health_check_id = create_response.body['HealthCheck']['Id'] @@ -82,7 +86,11 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do before do response_1 = @r53_connection.create_health_check('8.8.8.8', '53', 'TCP') @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_ids = [@health_check_1_id, @health_check_2_id] end From 8b35f4f81c4da210728add8b47a0e34a77e3e2d8 Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Fri, 12 Sep 2014 12:25:13 +0100 Subject: [PATCH 2/2] [GH-3157] Fixed additional 1.9 hash --- tests/aws/requests/dns/health_check_tests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/aws/requests/dns/health_check_tests.rb b/tests/aws/requests/dns/health_check_tests.rb index 994182587..59e8e82d3 100644 --- a/tests/aws/requests/dns/health_check_tests.rb +++ b/tests/aws/requests/dns/health_check_tests.rb @@ -121,7 +121,7 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do tests('assign a health check to a DNS record') 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_health_check @health_check_id end