Topic: Need a code change suggestion on capistrano

We are currently using cap to deploy war file into nodes. on the actual setup, we perform one http utl test to validate if pass then  the deploy is considered successful. I am not not a ruby dev but a system admin that needs some help on changing the code.a partial deploy.rb file:


task :test_host do
  cnt=0
  logger.debug("Test URL: http://#{host_name}#{test_local}")
  begin
    open("http://#{host_name}#{test_local}") do |f|
  #    pp f
    end

    break
    rescue Exception => error
    cnt += 1
    sleep(1)
  end while cnt < failed_count

  if cnt >=failed_count
    logger.important("Test failed on #{host_name} : #{cnt} times")
    exit 1
    break
  end


------

how can  i change it to do more URL tests like if defined ?


open("http://#{host_name}#{test_local1}")
open("http://#{host_name}#{test_local2}")
open("http://#{host_name}#{test_local3}")

Your help is appreciated

Last edited by benwade (2012-07-28 18:30:06)