Revision e54016da
Added by Marek Hulán over 8 years ago
test/unit/plugin_test.rb | ||
---|---|---|
plugin.logging.expects(:add_logger).with(:test_logger, {:enabled => true})
|
||
plugin.logger(:test_logger, {:enabled => true})
|
||
end
|
||
|
||
def test_register_custom_status
|
||
status = Struct.new(:status)
|
||
@klass.register :foo do
|
||
register_custom_status(status)
|
||
end
|
||
assert_include HostStatus.status_registry, status
|
||
HostStatus.status_registry.delete status
|
||
end
|
||
end
|
Also available in: Unified diff
Fixes #10782 - global host status
Introduce new global host status that is composed of host substatuses.Each substatus defines a mapping to the global one which can result in
three values
Plugins can add their own substatuses. These are automatically
propagated also to API.
Thanks to Tomas Strachota who wrote the original code.