From a5e28e2ed57fa147bfd921f6a1df672d602f28aa Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 13 Nov 2012 10:59:59 +0000 Subject: Ensure we have a URL --- worker/tests/http.rb | 10 ++++++++++ worker/tests/https.rb | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/worker/tests/http.rb b/worker/tests/http.rb index f1b5843..4f2cf0b 100755 --- a/worker/tests/http.rb +++ b/worker/tests/http.rb @@ -42,6 +42,16 @@ class HTTPTest @error = "" + + # + # Ensure we had a URL + # + if ( @test_data[:target_host].nil? ) + @error = "Missing URL for the test" + return false + end + + # # Do the fetch, if this success then we'll have the # @status + @text setup diff --git a/worker/tests/https.rb b/worker/tests/https.rb index f1b5843..2575a35 100755 --- a/worker/tests/https.rb +++ b/worker/tests/https.rb @@ -6,7 +6,7 @@ require 'uri' -class HTTPTest +class HTTPSTest # # Data passed from the JSON hash. @@ -42,6 +42,16 @@ class HTTPTest @error = "" + + # + # Ensure we had a URL + # + if ( @test_data[:target_host].nil? ) + @error = "Missing URL for the test" + return false + end + + # # Do the fetch, if this success then we'll have the # @status + @text setup -- cgit v1.2.1