summaryrefslogtreecommitdiff
path: root/worker/tests/rsync.rb
diff options
context:
space:
mode:
Diffstat (limited to 'worker/tests/rsync.rb')
-rwxr-xr-xworker/tests/rsync.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/worker/tests/rsync.rb b/worker/tests/rsync.rb
index 1d4e49f..02f2dfa 100755
--- a/worker/tests/rsync.rb
+++ b/worker/tests/rsync.rb
@@ -29,6 +29,23 @@ class RSYNCTest
#
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
@@ -48,7 +65,7 @@ class RSYNCTest
# Get the hostname & port to test against.
#
host = @test_data['target_host']
- port = 873
+ port = @test_data['test_port']
puts "rsync testing host #{host}:#{port}" if ( @test_data['verbose'] )