MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CheckNotification

Function CheckNotification

test/icinga-checkresult.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static void CheckNotification(const Checkable::Ptr& checkable, bool expected, NotificationType type = NotificationRecovery)
41{
42 BOOST_CHECK((expected && checkable->GetExtension("requested_notifications").ToBool()) || (!expected && !checkable->GetExtension("requested_notifications").ToBool()));
43
44 if (expected && checkable->GetExtension("requested_notifications").ToBool())
45 BOOST_CHECK(checkable->GetExtension("notification_type") == type);
46
47 checkable->SetExtension("requested_notifications", false);
48}
49
50BOOST_AUTO_TEST_CASE(host_1attempt)
51{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

GetExtensionMethod · 0.80
SetExtensionMethod · 0.80
ToBoolMethod · 0.45

Tested by

no test coverage detected