Sha256: 2423f612358efc281b3044804fb324bbcd9c8b63aa8aaaecd467efa7f50eaf97

Contents?: true

Size: 777 Bytes

Versions: 41

Compression:

Stored size: 777 Bytes

Contents

#
# Test chimpd client
#
$LOAD_PATH << File.dirname(__FILE__) + "/.."
require 'lib/right_chimp.rb'
require 'rspec'
require 'pp'

include Chimp

host = "localhost"
port = "9055"

describe Chimp::ChimpDaemonClient do
  before :all do
    @c = ChimpDaemon.new
    @c.verbose = false
    @c.concurrency = 3
    @c.spawn_queue_runner
    @c.spawn_webserver
  end

  after :all do
    @c.quit if @c
  end

  #it "can quit a chimpd" do
  #  response_code = ChimpDaemonClient.quit(host, port)
  #  response_code.should == 200
  #end
  
  #
  # .submit
  #
  it "can submit work to chimpd" do
    c = Chimp::Chimp.new
    c.tags = ["service:auditor=true"]
    c.script = "SYS DNSMadeEasy Register Addresses"
    c.dry_run = false
    ChimpDaemonClient.submit(host, port, c)
  end

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
right_chimp-1.0 spec/spec_chimpd_client.rb