diff options
Diffstat (limited to 'worker/tests/https.rb')
-rwxr-xr-x | worker/tests/https.rb | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/worker/tests/https.rb b/worker/tests/https.rb index fcc716b..55a423b 100755 --- a/worker/tests/https.rb +++ b/worker/tests/https.rb @@ -26,6 +26,25 @@ class HTTPSTest # def initialize( data ) @test_data = data + @error = nil + + # + # Ensure we have an URL + # + if ( @test_data["target_host"].nil? ) + @error = "Missing URL for the test." + raise ArgumentError, @error + end + + # + # Ensure we have a port + # + if ( @test_data["test_port"].nil? ) + @error = "Missing port for the test." + raise ArgumentError, @error + + end + end @@ -40,18 +59,6 @@ class HTTPSTest # def run_test - @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 |