Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 351aaad563c87e32cb83244add10469749c6dd00
https://github.com/tribe29/checkmk/commit/351aaad563c87e32cb83244add1046974…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-03 (Fri, 03 Jul 2020)
Changed paths:
M cmk/base/automations/check_mk.py
M cmk/base/checking.py
M cmk/base/config.py
M cmk/base/core_nagios.py
M cmk/base/data_sources/_data_sources.py
M cmk/base/discovery.py
M cmk/base/dump_host.py
M cmk/base/inventory.py
M cmk/base/modes/check_mk.py
M tests-py3/unit/cmk/base/data_sources/test_data_sources.py
M tests-py3/unit/cmk/base/data_sources/test_host_sections.py
Log Message:
-----------
Do not pass host config to datasources
The DataSources class does not really need it. As a result we must pass
the list of sources to the DataSources container. This is a rather
common pattern, indeed, the responsibility of containers is to contain,
not to fill itself magically. Callers then pass the sources.
Passing the list of sources further increases the overall testability of
the class. It further makes it clear that
`DataSources.get_host_sections()` barely touches DataSources.
We also move the agent description to HostConfig. It had nothing to do
with DataSources and everything with HostConfig.
CMK-4838
Change-Id: I1cea1810f360cf24293b7875a69e9e3f195eaffc
Commit: 7df8490320f35157daa8c5f83d2eedbae18c2147
https://github.com/tribe29/checkmk/commit/7df8490320f35157daa8c5f83d2eedbae…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-03 (Fri, 03 Jul 2020)
Changed paths:
M tests-py3/unit/cmk/base/data_sources/test_host_sections.py
Log Message:
-----------
DataSources.get_host_sections(): Test piggyback branch
The (large) method has two main paths of execution: piggy-backed data
and regular hosts. We add tests to make sure that both branches are
under control and can be refactored.
CMK-4838
Change-Id: Iec757fcfc8756153b209b305c318fa8f180058e1
Compare:
https://github.com/tribe29/checkmk/compare/5760d62bad50...7df8490320f3