From 5458fbf8e1fa0fd893675be03a45d168e0512e85 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 13 Nov 2012 15:02:05 +0000 Subject: Ensure we have a target & a port. --- worker/tests/ftp.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'worker/tests/ftp.rb') 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 -- cgit v1.2.1