summaryrefslogtreecommitdiff
path: root/worker/tests/ftp.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-13 15:02:05 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-13 15:02:05 +0000
commit5458fbf8e1fa0fd893675be03a45d168e0512e85 (patch)
tree119ef0472b6a49f700e97470f6667239d9147117 /worker/tests/ftp.rb
parent9e8a2e96d743cdcfc92722d03b6aaedc8fbf84cf (diff)
Ensure we have a target & a port.
Diffstat (limited to 'worker/tests/ftp.rb')
-rwxr-xr-xworker/tests/ftp.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/worker/tests/ftp.rb b/worker/tests/ftp.rb
index f5eccbb..63b6714 100755
--- a/worker/tests/ftp.rb
+++ b/worker/tests/ftp.rb
@@ -28,6 +28,25 @@ class FTPTest
#
def initialize( data )
@test_data = data
+ @error = nil
+
+
+ #
+ # Ensure we have a host to probe
+ #
+ if ( @test_data["target_host"].nil? )
+ @error = "Missing target for the test."
+ raise ArgumentError, @error
+ end
+
+ #
+ # Ensure we have a port to test.
+ #
+ if ( @test_data["test_port"].nil? )
+ @error = "Missing port for the test."
+ raise ArgumentError, @error
+ end
+
end