From 68dd7527495e1f8c7bce41320f8fb9a3bde10939 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Fri, 7 Dec 2012 11:30:19 +0000 Subject: When reporting on failure-types the HTTP/HTTPS test is often reported incorrectly. Fixed this now, based on the URL and added a test case. --- lib/custodian/protocoltest/http.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/custodian/protocoltest/http.rb') diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index 81113c0..6de74d3 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -91,7 +91,19 @@ module Custodian end - + # + # Get the right type of this object, based on the + # URL + # + def get_type + if ( @url =~ /^https:/ ) + "https" + elsif ( @url =~ /^http:/ ) + "http" + else + raise ArgumentError, "URL isn't http/https: #{@url}" + end + end # # Allow this test to be serialized. -- cgit v1.2.1