summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-13 10:59:59 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-13 10:59:59 +0000
commita5e28e2ed57fa147bfd921f6a1df672d602f28aa (patch)
tree787aaaf676f0c442f1b574d591cf8d40df9ac3ed
parent897d69b5e9bf47a49b4bd0c651a67d2ec91de437 (diff)
Ensure we have a URL
-rwxr-xr-xworker/tests/http.rb10
-rwxr-xr-xworker/tests/https.rb12
2 files changed, 21 insertions, 1 deletions
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