Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 450e170e918cf2d9a541ed86ee5798acb0b9721f
https://github.com/tribe29/checkmk/commit/450e170e918cf2d9a541ed86ee5798acb…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2020-07-02 (Thu, 02 Jul 2020)
Changed paths:
M tests-py3/pylint/test_pylint.py
Log Message:
-----------
Fix formatting
Change-Id: I338e24080a9ce56ef42830e90380b8bbee6a606e
Commit: 1b1ff44a67f59f4d83e55e9219bb1170710d361a
https://github.com/tribe29/checkmk/commit/1b1ff44a67f59f4d83e55e9219bb11707…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-02 (Thu, 02 Jul 2020)
Changed paths:
A tests-py3/unit/cmk/base/data_sources/conftest.py
A tests-py3/unit/cmk/base/data_sources/test_cmd_caching.py
M tests-py3/unit/cmk/base/data_sources/test_snmp_data_source.py
R tests-py3/unit/cmk/base/test_data_sources_cmd_caching.py
Log Message:
-----------
Refactor some data sources tests
Global variables:
- Reset the mutable state from the data sources *after* the
test. Resetting before the tests is a bad idea as the last
test pollutes the state.
- Reset global mutable state by default in every data source
test by moving the fixture in the package scope.
- Replace a global variable used *in the tests* with
library features.
Readability:
- Shorten names by skipping namespace, the scope of the tests
is short enough that there is no ambiguity.
- Reformat to better highlight the structure.
- Do not pass fixtures as argument when they are not used in
the body. Seamingly unused arguments are noisy.
- Do not put teardown code in `try/finally:`. Teardown code in
the test body is but distracting noise. After all, the
teardown section of the test framework fullfills this role.
- Fixturize patch when possible. The patch still does two
things: actually patching and some sanity checks. It is not
clear whether the sanity checks (of global variables!) really
needs to be performed each time `DataSource._run` is called or
whether it could not be in the test body.
Change-Id: If7b57ecffe96f4afe2094ae3444804d37f4e1d79
Commit: 11b6ee3293dcca4f2dcc984f9cb2b660c8cb0253
https://github.com/tribe29/checkmk/commit/11b6ee3293dcca4f2dcc984f9cb2b660c…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-02 (Thu, 02 Jul 2020)
Changed paths:
M cmk/base/data_sources/_data_sources.py
M cmk/base/data_sources/host_sections.py
M cmk/base/inventory.py
M tests-py3/unit/cmk/base/data_sources/test_host_sections.py
Log Message:
-----------
Consistently instantiate MHS
This also does not leak the MHS store from the MultiHostSections class.
CMK-4726
Change-Id: Ia54edca842994c736c4bb2f887aae1c32fb3bda3
Commit: fb94a5b8a1e29a8d9fcb5c4d1f1a608f21f18f9f
https://github.com/tribe29/checkmk/commit/fb94a5b8a1e29a8d9fcb5c4d1f1a608f2…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-02 (Thu, 02 Jul 2020)
Changed paths:
M cmk/base/data_sources/_data_sources.py
Log Message:
-----------
Simpler max_cachefile_age handling in DS
`max_cachefile_age` was actually one of three constants:
- the value given to the function if there is one
- config.cluster_max_cachefile_age for clusters
- config.check_max_cachefile_age otherwise
However, the code was treating it as if it were a function of the host.
We gain some clarity by setting its value once at the start of the
method.
CMK-4838
Change-Id: I32647af7442754e8f96fdcf4ab0ef04d51746921
Commit: bcec284d56ddd3189add2e44ae00699230c9ddda
https://github.com/tribe29/checkmk/commit/bcec284d56ddd3189add2e44ae0069923…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-02 (Thu, 02 Jul 2020)
Changed paths:
M cmk/base/checking.py
M cmk/base/data_sources/host_sections.py
M cmk/base/discovery.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:
-----------
Mapping API for MultiHostSections
MultiHostSections is an AbstractHostSections container.
We make this fact clear by providing the Mapping API to the
class. We further avoid leaking the `Dict[HostKey,
AbstractHostSections]` store.
We remove the `MultiHostSectionsData` type. `MultiHostSections`
also *is* a `Mapping[HostKey, AbstractHostSections]` and should
be used instead.
CMK-4838
Change-Id: I5fb845c42b0ea030a9249b293d6c1db399592eb3
Commit: 3dc8a786225398e16bac47cf3f2f50388ab45ae4
https://github.com/tribe29/checkmk/commit/3dc8a786225398e16bac47cf3f2f50388…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-02 (Thu, 02 Jul 2020)
Changed paths:
M cmk/base/data_sources/_data_sources.py
M cmk/base/dump_host.py
Log Message:
-----------
Readability: DataSources.get_host_sections()
- Use short and consistent names for the variables
- Shorten long lines
DataSources: Remove one more method
CMK-4838
Change-Id: I6a98c0110b661ab4bbacd5527294cc8d266464bd
Compare:
https://github.com/tribe29/checkmk/compare/2d26eabbff8e...3dc8a7862253