Sha256: 57a1c179f1fdaf1aca4cc609dcdab6f11a26cf9977be42c7478f24a0dfa1c5cd

Contents?: true

Size: 1.61 KB

Versions: 41

Compression:

Stored size: 1.61 KB

Contents

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

include Chimp

chimp_command = "CHIMP_TEST=true bundle exec bin/chimp --noprompt"
test_tag      = "--tag='info:deployment=moo:localring91'"
test_script   = "--script='SYS DNSMadeEasy Register Addresses'"

describe Chimp::Chimp do
  #
  # Selection options
  #
  #it "should not prompt when there is no action" do
  #  data =`CHIMP_TEST=true bundle exec bin/chimp #{test_tag}`
  #  $?.should == 0
  #  data.match("No actions to perform.").should != nil 
  #end

  #
  # RightScript execution
  #
  it "should run a rightscript with a tag query" do
    system("#{chimp_command} #{test_tag} #{test_script}")
    $?.should == 0
  end
  
  it "should run scripts on an array with a concurrency of 1 and a delay of 5" do
    system("#{chimp_command} --array='Core91' --concurrency=1 --delay=5 --script='SYS MAIL postfix configuration'")
    $?.should == 0
  end
  
  it "should run scripts on an array with a concurrency of 4 and a delay of 0" do
    system("#{chimp_command} --array='Core94' --array='Core91' --concurrency=4 --delay=0 --script='SYS MAIL postfix configuration'")
    $?.should == 0
  end
  
  #
  # chimpd submission
  #
  
  #it "should run a rightscript with a tag query via chimpd" do
  #  system('CHIMP_TEST=true bundle exec bin/chimpd')
  #  system('CHIMP_TEST=true bundle exec bin/chimp --chimpd --dry-run --noprompt --tag="info:deployment=moo:localring91" --script="SYS DNSMadeEasy Register Addresses"')
  #  $?.should == 0
  #  system('CHIMP_TEST=true bundle exec bin/chimpd --quit')
  #end
end


Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
right_chimp-2.1.28 spec/spec_chimp_commandline.rb
right_chimp-2.1.27 spec/spec_chimp_commandline.rb
right_chimp-2.1.26 spec/spec_chimp_commandline.rb
right_chimp-2.1.25.2 spec/spec_chimp_commandline.rb
right_chimp-2.1.25 spec/spec_chimp_commandline.rb
right_chimp-2.1.24 spec/spec_chimp_commandline.rb
right_chimp-2.1.22.2 spec/spec_chimp_commandline.rb
right_chimp-2.1.22.1 spec/spec_chimp_commandline.rb
right_chimp-2.1.22 spec/spec_chimp_commandline.rb
right_chimp-2.1.21 spec/spec_chimp_commandline.rb
right_chimp-2.1.19.1 spec/spec_chimp_commandline.rb
right_chimp-2.1.19 spec/spec_chimp_commandline.rb
right_chimp-2.1.18 spec/spec_chimp_commandline.rb
right_chimp-2.1.17 spec/spec_chimp_commandline.rb
right_chimp-2.1.15 spec/spec_chimp_commandline.rb
right_chimp-2.1.14 spec/spec_chimp_commandline.rb
right_chimp-2.1.13 spec/spec_chimp_commandline.rb
right_chimp-2.1.12 spec/spec_chimp_commandline.rb
right_chimp-2.1.10 spec/spec_chimp_commandline.rb
right_chimp-2.1.8 spec/spec_chimp_commandline.rb