Revision a089227c
Added by Marc Dequènes over 13 years ago
- ID a089227ca94121115f46e5998b497fa102787398
bin/test_client | ||
---|---|---|
|
||
def start_work
|
||
task "compare stuff" do
|
||
ask "MapMaker", :info1, "/_cyborg_"
|
||
ask "Librarian", :info2, "/_cyborg_"
|
||
ask "Librarian", :library, "/Records"
|
||
ask "Librarian", :persons, "/Records/Persons"
|
||
#ask "MapMaker", :info1, "/_cyborg_"
|
||
#ask "Librarian", :info2, "/_cyborg_"
|
||
#ask "Librarian", :library, "/Records"
|
||
#ask "Librarian", :persons, "/Records/Persons"
|
||
#ask "Librarian", :dns_domains, "/Records/DnsDomains"
|
||
ask "Librarian", :gorou, "/Records/Persons/gorou"
|
||
ask "Librarian", :guihome_net, "/Records/DnsDomains/guihome.net"
|
||
ask "Librarian", :person_search, "/Records/Persons/?", {:uid => "g*"}
|
||
#ask "Librarian", :gorou, "/Records/Persons/gorou"
|
||
#ask "Librarian", :guihome_net, "/Records/DnsDomains/guihome.net"
|
||
#ask "Librarian", :person_search, "/Records/Persons/?", {:uid => "g*"}
|
||
#ask "Librarian", :person_search_null, "/Records/Persons/?"
|
||
#ask "MapMaker", :zones, "/Zones"
|
||
#ask "MapMaker", :wanted_failure, "/prout"
|
||
... | ... | |
#ask "MapMaker", :zone_mp, "/Zones/milkypond.org"
|
||
#ask "MapMaker", :dns_check, "/Services/DNS/check_config"
|
||
#ask "MapMaker", :search, "/Zones/?"
|
||
ask "MapMaker", :search_master, "/Zones/?", {:is_master => true}
|
||
#ask "MapMaker", :search_master, "/Zones/?", {:is_master => true}
|
||
#ask "MapMaker", :search_slave, "/Zones/?", {:is_master => false}
|
||
#know? "MapMaker", :k1, "/Zones"
|
||
#know? "MapMaker", :k2, "/prout"
|
||
set_user "duck"
|
||
ask "Clerk", :dns_info, "/Commands/DNS/INFO"
|
||
on_error do
|
||
puts "PLOUF"
|
||
pp errors
|
||
pp results
|
||
stop_bot :at_once
|
||
stop_bot :quickly
|
||
end
|
||
on_success do
|
||
puts "OK"
|
||
pp errors
|
||
pp results
|
||
puts "Tadam: " + (results[:info1][:api_version] == results[:info2][:api_version] ? "same" : "different")
|
||
set_preferred_locales "fr;q=1,en-us,en"
|
||
#puts "Tadam: " + (results[:info1][:api_version] == results[:info2][:api_version] ? "same" : "different")
|
||
#set_preferred_locales "fr;q=1,en-us,en"
|
||
meet "waiter", :zzz
|
||
STDOUT.flush
|
||
on_success do
|
||
puts "OK compare stuff"
|
||
end
|
||
on_error do
|
||
stop_bot :at_once
|
||
stop_bot :quickly
|
||
end
|
||
end
|
||
end
|
||
... | ... | |
bot = CyborgHood::TestClientHome::TestClientClient.new
|
||
|
||
trap('INT') do
|
||
bot.ask_to_stop
|
||
bot.stop(:quickly)
|
||
end
|
||
trap('TERM') do
|
||
bot.ask_to_stop
|
||
bot.stop(:quickly)
|
||
end
|
||
|
||
bot.run
|
Also available in: Unified diff
[fix/evol] work on better Interface/Task/Conversation/… sync and bot stop action in order to avoid races and locks