summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-12-07 11:30:19 +0000
committerSteve Kemp <steve@steve.org.uk>2012-12-07 11:30:19 +0000
commit68dd7527495e1f8c7bce41320f8fb9a3bde10939 (patch)
tree1921b7c573f3b4c682aa68a03f30fc17e9204bd8 /lib
parent3af781b6ab058206a70d7f7b4d1dc1758d299170 (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/protocoltest/http.rb14
1 files changed, 13 insertions, 1 deletions
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.