summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-22 15:38:07 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-22 15:38:07 +0000
commit918d964adee64d0a14fc80797def1070c39061b3 (patch)
tree25662cfd3ca6e73855d16ef8937f0ba2ff97603e /bin
parentc3a3f054ada31db25db4194ecb4a17db7fdb1c47 (diff)
Parse the configuration file into arrays of jobs, via our test-factory
Diffstat (limited to 'bin')
-rwxr-xr-xbin/custodian-enqueue4
-rwxr-xr-xbin/custodian-parse-execute55
2 files changed, 2 insertions, 57 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index c9d9232..0b4a40b 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -161,9 +161,9 @@ if __FILE__ == $0 then
if ( ENV['TEST'] )
# nop
elsif ( ENV['DUMP'] )
- puts test.to_json
+ puts test
else
- queue.put( test.to_json )
+ queue.put( test.to_s )
end
end
diff --git a/bin/custodian-parse-execute b/bin/custodian-parse-execute
deleted file mode 100755
index 2a75629..0000000
--- a/bin/custodian-parse-execute
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/ruby -Ilib/ -I../lib
-#
-# This is simple test code which will parse a line from the configuration
-# file and execute it via our class-factory
-#
-#
-# Simple test code. Will be folded into the test-suite.
-#
-#
-
-require 'custodian/protocoltest/tcp.rb'
-require 'custodian/protocoltest/dns.rb'
-require 'custodian/protocoltest/ftp.rb'
-require 'custodian/protocoltest/http.rb'
-require 'custodian/protocoltest/jabber.rb'
-require 'custodian/protocoltest/ldap.rb'
-require 'custodian/protocoltest/ping.rb'
-require 'custodian/protocoltest/rsync.rb'
-require 'custodian/protocoltest/ssh.rb'
-require 'custodian/protocoltest/smtp.rb'
-
-
-
-
-#
-# The line is in the first agument
-#
-txt = ARGV.shift
-
-
-if ( txt.nil? )
- puts "#{$0} 'foo must run service ..'"
- exit 1
-end
-
-
-
-#
-# Create the object
-#
-begin
- c = Custodian::TestFactory.create( txt )
-
- puts "created object of class type #{c.class}"
- puts ".to_s : #{c.to_s}"
- puts ".to_json : #{c.to_json}"
-
- if ( c.run_test )
- puts "Test succeeded"
- else
- puts "Test failed: #{c.error()}"
- end
-rescue => ex
- puts "Exception: #{ex}"
-end