summaryrefslogtreecommitdiff
path: root/lib/custodian/protocol-tests
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-14 20:26:51 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-14 20:26:51 +0000
commite26d29b15c8012197c3ce72fc5dd75652daa38a6 (patch)
treeffe2cb3ef0d007a5abe6e611b41a25b8acaac772 /lib/custodian/protocol-tests
parent5a1a8a9ecbfcfa90a09ce2a0006c39d97af9ee63 (diff)
Ensure that our timeout period is an integer
Diffstat (limited to 'lib/custodian/protocol-tests')
-rwxr-xr-xlib/custodian/protocol-tests/ftp.rb2
-rwxr-xr-xlib/custodian/protocol-tests/http.rb2
-rwxr-xr-xlib/custodian/protocol-tests/https.rb2
-rwxr-xr-xlib/custodian/protocol-tests/jabber.rb2
-rwxr-xr-xlib/custodian/protocol-tests/ldap.rb2
-rwxr-xr-xlib/custodian/protocol-tests/rsync.rb2
-rwxr-xr-xlib/custodian/protocol-tests/smtp.rb2
-rwxr-xr-xlib/custodian/protocol-tests/ssh.rb2
8 files changed, 8 insertions, 8 deletions
diff --git a/lib/custodian/protocol-tests/ftp.rb b/lib/custodian/protocol-tests/ftp.rb
index a11abaf..2d0700a 100755
--- a/lib/custodian/protocol-tests/ftp.rb
+++ b/lib/custodian/protocol-tests/ftp.rb
@@ -74,7 +74,7 @@ class FTPTest
puts "FTP testing host #{host}:#{port}" if ( @test_data['verbose'] )
begin
- timeout( @test_data["timeout"] ) do
+ timeout( @test_data["timeout"].to_i ) do
begin
socket = TCPSocket.new( host, port )
diff --git a/lib/custodian/protocol-tests/http.rb b/lib/custodian/protocol-tests/http.rb
index 445b192..c11e27a 100755
--- a/lib/custodian/protocol-tests/http.rb
+++ b/lib/custodian/protocol-tests/http.rb
@@ -67,7 +67,7 @@ class HTTPTest
# Do the fetch, if this success then we'll have the
# @status + @text setup
#
- if ( getURL(@test_data["target_host"], @test_data["timeout"] ) )
+ if ( getURL(@test_data["target_host"], @test_data["timeout"].to_i ) )
#
# Do we need to test for a HTTP status code?
diff --git a/lib/custodian/protocol-tests/https.rb b/lib/custodian/protocol-tests/https.rb
index ec2597b..fe0cd99 100755
--- a/lib/custodian/protocol-tests/https.rb
+++ b/lib/custodian/protocol-tests/https.rb
@@ -68,7 +68,7 @@ class HTTPSTest
# Do the fetch, if this success then we'll have the
# @status + @text setup
#
- if ( getURL(@test_data["target_host"], @test_data["timeout"] ) )
+ if ( getURL(@test_data["target_host"], @test_data["timeout"].to_i ) )
#
# Do we need to test for a HTTP status code?
diff --git a/lib/custodian/protocol-tests/jabber.rb b/lib/custodian/protocol-tests/jabber.rb
index 489b82a..7a0c855 100755
--- a/lib/custodian/protocol-tests/jabber.rb
+++ b/lib/custodian/protocol-tests/jabber.rb
@@ -75,7 +75,7 @@ class JABBERTest
puts "Jabber testing host #{host}:#{port}" if ( @test_data['verbose'] )
begin
- timeout(@test_data["timeout"]) do
+ timeout(@test_data["timeout"].to_i) do
begin
socket = TCPSocket.new( host, port )
diff --git a/lib/custodian/protocol-tests/ldap.rb b/lib/custodian/protocol-tests/ldap.rb
index 5c94dd8..af0addc 100755
--- a/lib/custodian/protocol-tests/ldap.rb
+++ b/lib/custodian/protocol-tests/ldap.rb
@@ -74,7 +74,7 @@ class LDAPTest
puts "LDAP testing host #{host}:#{port}" if ( @test_data['verbose'] )
begin
- timeout(@test_data["timeout"]) do
+ timeout(@test_data["timeout"].to_i) do
begin
socket = TCPSocket.new( host, port )
diff --git a/lib/custodian/protocol-tests/rsync.rb b/lib/custodian/protocol-tests/rsync.rb
index ab2ed9b..d2a2f45 100755
--- a/lib/custodian/protocol-tests/rsync.rb
+++ b/lib/custodian/protocol-tests/rsync.rb
@@ -74,7 +74,7 @@ class RSYNCTest
puts "rsync testing host #{host}:#{port}" if ( @test_data['verbose'] )
begin
- timeout(@test_data["timeout"]) do
+ timeout(@test_data["timeout"].to_i) do
begin
socket = TCPSocket.new( host, port )
diff --git a/lib/custodian/protocol-tests/smtp.rb b/lib/custodian/protocol-tests/smtp.rb
index 340821c..6a3895d 100755
--- a/lib/custodian/protocol-tests/smtp.rb
+++ b/lib/custodian/protocol-tests/smtp.rb
@@ -74,7 +74,7 @@ class SMTPTest
puts "SMTP testing host #{host}:#{port}" if ( @test_data['verbose'] )
begin
- timeout(@test_data["timeout"]) do
+ timeout(@test_data["timeout"].to_i) do
begin
socket = TCPSocket.new( host, port )
diff --git a/lib/custodian/protocol-tests/ssh.rb b/lib/custodian/protocol-tests/ssh.rb
index 870be32..801a381 100755
--- a/lib/custodian/protocol-tests/ssh.rb
+++ b/lib/custodian/protocol-tests/ssh.rb
@@ -73,7 +73,7 @@ class SSHTest
puts "ssh testing host #{host}:#{port}" if ( @test_data['verbose'] )
begin
- timeout(@test_data["timeout"]) do
+ timeout(@test_data["timeout"].to_i) do
begin
socket = TCPSocket.new( host, port )