Sha256: c95314f91c53d43c4224387e4efe69b7c447054ed049e417cec2793a41c696f8
Contents?: true
Size: 982 Bytes
Versions: 1
Compression:
Stored size: 982 Bytes
Contents
require 'test_helper' require 'outpost/scouts' describe "using only report data integration test" do class RetrieveServerData < Outpost::Application using Outpost::Scouts::Http => 'master http server' do options :host => 'localhost', :port => 9595, :path => '/' end using Outpost::Scouts::Ping => :load_balancer do options :host => 'localhost' report :up, :response_time => {:less_than => 500} end end before(:each) do @outpost = RetrieveServerData.new @outpost.run end it "should build report for each scout" do assert_equal 2, @outpost.reports.size end it "should build reports with data" do http_report = @outpost.reports['master http server'] ping_report = @outpost.reports[:load_balancer] report_data = http_report.data assert report_data.delete(:response_time) < 500 assert_equal({:response_code => 200, :response_body => 'Up and running!'}, http_report.data) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
outpost-0.2.5 | test/integration/reporting_test.rb |