diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-13 15:19:07 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-13 15:19:07 +0000 |
commit | d5f77dd9c7a272d0912e4fcbd2e05cca0bc62147 (patch) | |
tree | a7b13b4fff8d4146d024aed7f97e8a96d7d6b5da | |
parent | 7b4b8a0b37c8f772175438b0e05ea0b83b5ae718 (diff) |
Ensure we have a target + port
-rwxr-xr-x | worker/tests/ldap.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/worker/tests/ldap.rb b/worker/tests/ldap.rb index d89ee35..e15f4e0 100755 --- a/worker/tests/ldap.rb +++ b/worker/tests/ldap.rb @@ -28,6 +28,24 @@ class LDAPTest # 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 |