diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-22 15:38:07 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-22 15:38:07 +0000 |
commit | 8cd8125b071f4a0be8ec05d40471da6821067b07 (patch) | |
tree | 25662cfd3ca6e73855d16ef8937f0ba2ff97603e /lib/custodian/protocoltest | |
parent | 56bb4da159266f5b10d9787a7b9eacf788001d0c (diff) |
Parse the configuration file into arrays of jobs, via our test-factory
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r-- | lib/custodian/protocoltest/dns.rb | 14 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ftp.rb | 16 | ||||
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 15 | ||||
-rw-r--r-- | lib/custodian/protocoltest/jabber.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ldap.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ping.rb | 15 | ||||
-rw-r--r-- | lib/custodian/protocoltest/rsync.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/smtp.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ssh.rb | 18 | ||||
-rw-r--r-- | lib/custodian/protocoltest/tcp.rb | 18 |
10 files changed, 27 insertions, 137 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index cf37abf..6c5e8db 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -39,26 +39,16 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "dns-test - TODO." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - # # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ftp.rb b/lib/custodian/protocoltest/ftp.rb index db05ac4..a816bfd 100644 --- a/lib/custodian/protocoltest/ftp.rb +++ b/lib/custodian/protocoltest/ftp.rb @@ -71,27 +71,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ftp-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index b3f446e..1b7f442 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -53,21 +53,10 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "http-test of #{@url}." - end - - - - - # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json + @line end diff --git a/lib/custodian/protocoltest/jabber.rb b/lib/custodian/protocoltest/jabber.rb index e043481..9c0eb6d 100644 --- a/lib/custodian/protocoltest/jabber.rb +++ b/lib/custodian/protocoltest/jabber.rb @@ -66,28 +66,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "jabber-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ldap.rb b/lib/custodian/protocoltest/ldap.rb index bfda9f8..b27e5d6 100644 --- a/lib/custodian/protocoltest/ldap.rb +++ b/lib/custodian/protocoltest/ldap.rb @@ -68,28 +68,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ldap-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ping.rb b/lib/custodian/protocoltest/ping.rb index 173f4f4..c13c17c 100644 --- a/lib/custodian/protocoltest/ping.rb +++ b/lib/custodian/protocoltest/ping.rb @@ -52,21 +52,10 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ping-test - #{@host}." - end - - - - - # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json + @line end diff --git a/lib/custodian/protocoltest/rsync.rb b/lib/custodian/protocoltest/rsync.rb index 34745c7..8b4e84c 100644 --- a/lib/custodian/protocoltest/rsync.rb +++ b/lib/custodian/protocoltest/rsync.rb @@ -67,28 +67,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "rsync-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/smtp.rb b/lib/custodian/protocoltest/smtp.rb index ee52131..0d22c95 100644 --- a/lib/custodian/protocoltest/smtp.rb +++ b/lib/custodian/protocoltest/smtp.rb @@ -68,28 +68,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "smtp-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ssh.rb b/lib/custodian/protocoltest/ssh.rb index b8a6354..205099e 100644 --- a/lib/custodian/protocoltest/ssh.rb +++ b/lib/custodian/protocoltest/ssh.rb @@ -68,29 +68,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ssh-test of #{@host}:#{@port}." + return( @line ) end # - # Convert this class to JSON such that it may be - # serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb index 21d2ecd..c14f686 100644 --- a/lib/custodian/protocoltest/tcp.rb +++ b/lib/custodian/protocoltest/tcp.rb @@ -94,28 +94,16 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "tcp-test of #{@host}:#{@port} looking for banner '#{@banner}'." + return( @line ) end - - # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test |