Skip to content

Instantly share code, notes, and snippets.

@jsvd
Created March 1, 2011 18:12
Show Gist options
  • Save jsvd/849574 to your computer and use it in GitHub Desktop.
Save jsvd/849574 to your computer and use it in GitHub Desktop.
def test_s1
monitor_epl "S1"
send_event("Subsystems", ["Srv_cpuavg_total", "Qa", "ip", "pt.ptp", "TPPCRM01", "OS", "", -1, 60, "Max", 1, [10.0,50.0,60.0,70.0,90.0].to_java(:Double), 0])
send_timer(1)
send_event("Qa", [ "Qa", "ip", "pt.ptp", 1000, "Srv_cpuavg_total", "TPPCRM01", "", "OS", 95.2, 0, ""])
expected = {
"tag" => "Qa",
"subtag" => "ip",
"company" => "pt.ptp",
"timestamp" => 1000,
"event_name" => "Srv_cpuavg_total",
"host_name" => "TPPCRM01",
"asset_name" => "",
"index_weight" => 1,
"cycle" => 60,
"subsystem_name" => "OS",
"ava_criticality" => 0,
"value" => 95.2,
"status" => 6,
"message" => "",
}
@listener.assert_size(1)
@listener.assert_new([expected], :do_reset => true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment