Module: check_mk
Branch: master
Commit: c548e8f19f06f3e226226391be8cb92226eafd20
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c548e8f19f06f3…
Author: Roland Halbig <rh(a)mathias-kettner.de>
Date: Thu Feb 9 13:29:46 2017 +0100
Fixed displayed number of tables if rowlimit is reached.
Change-Id: Ibc34b30cdad478b214bc519a56063e916e768de5
---
web/htdocs/table.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/web/htdocs/table.py b/web/htdocs/table.py
index 175e311..e2851ba 100644
--- a/web/htdocs/table.py
+++ b/web/htdocs/table.py
@@ -179,6 +179,8 @@ def end():
if limit is not None:
# only use rows up to the limit plus the fixed rows
rows = [ rows[i] for i in range(num_rows_unlimited) if i < limit or rows[i][3]]
+ # Display corrected number of rows
+ num_rows_unlimited -= len([row for row in rows if row[3]])
# Render header
_write_table(table, rows, actions_enabled, actions_visible, search_term)
Module: check_mk
Branch: master
Commit: 971e1b723499fc1e753e422518a7008b8b3a90d7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=971e1b723499fc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 9 12:32:21 2017 +0100
tests: cleaned up special test case filter for crawl job
Change-Id: I3d54f086c5cdba37573fae8dc6b501531c4f1339
---
pytest.ini | 1 +
tests/conftest.py | 26 --------------------------
tests/web/test_crawl.py | 2 +-
3 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/pytest.ini b/pytest.ini
index e1e59d1..1c3715b 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -8,4 +8,5 @@ markers =
pylint: Mark a test as pylint test.
git: Mark a test to be executed in the Git repository context
packaging: This is a test to execute to verify the packaging of the testbuilds.
+ gui_crawl: All linked pages of the Web interface are visited and searched for errors
html_gentest: Generate test cases for htmllib refactoring.
diff --git a/tests/conftest.py b/tests/conftest.py
index 0ae62d3..a005291 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -22,32 +22,6 @@ def add_python_paths():
sys.path.insert(0, cmk_path())
-#
-# Make tests classification possible to only execute in specific environments.
-# For example only on the CI server.
-#
-
-def pytest_addoption(parser):
- parser.addoption("-E", action="store", metavar="NAME",
- help="only run tests matching the environment NAME.")
-
-
-def pytest_configure(config):
- config.addinivalue_line("markers",
- "env(name): mark test to run only on named environment. Some long running tests "
- "are only meant to be executed on the CI server. Those tests use the "
- "\'@pytest.mark.env(\"ci-server\")' marker. If you want to execute them, add "
- "\"-E ci-server\" to the py.test command.")
-
-
-def pytest_runtest_setup(item):
- envmarker = item.get_marker("env")
- if envmarker is not None:
- envname = envmarker.args[0]
- if envname != item.config.getoption("-E"):
- pytest.skip("test requires env %r" % envname)
-
-
def pytest_cmdline_main(config):
# Some special tests are not executed in a site environment
if config.getoption('markexpr') in [ "packaging", "git", "html_gentest" ]:
diff --git a/tests/web/test_crawl.py b/tests/web/test_crawl.py
index 9fc2aa3..228d20c 100644
--- a/tests/web/test_crawl.py
+++ b/tests/web/test_crawl.py
@@ -279,7 +279,7 @@ class SetQueue(Queue.Queue):
class TestCrawler(object):
- @pytest.mark.env("ci-server")
+ @pytest.mark.gui_crawl
def test_crawl(self, site):
self.stats = {}
self.todo = SetQueue()
Module: check_mk
Branch: master
Commit: bb3f40218550e186c32dc48c1ac8716b3c001dc1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bb3f40218550e1…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Feb 3 17:02:04 2017 +0100
4190 FIX mssql_blocked_sessions: Fixed unknown states if only one session is blocked
The check state has been unknown if only one session was blocked, because
the checkplugin was expecting one additional first line from the agent output
which does not exist anymore. The new version can handle both cases and will
not accidentally drop any information anymore.
Change-Id: Ibb51b14b5fed7c1d52c6bebe85264fb68cc2a860
---
.werks/4190 | 12 ++++++++++++
checks/mssql_blocked_sessions | 6 +++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/4190 b/.werks/4190
new file mode 100644
index 0000000..d6c8c4b
--- /dev/null
+++ b/.werks/4190
@@ -0,0 +1,12 @@
+Title: mssql_blocked_sessions: Fixed unknown states if only one session is blocked
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i4
+Date: 1486137493
+Class: fix
+
+The check state has been unknown if only one session was blocked, because
+the checkplugin was expecting one additional first line from the agent output
+which does not exist anymore. The new version can handle both cases and will
+not accidentally drop any information anymore.
diff --git a/checks/mssql_blocked_sessions b/checks/mssql_blocked_sessions
index ad43fcb..8923224 100644
--- a/checks/mssql_blocked_sessions
+++ b/checks/mssql_blocked_sessions
@@ -43,7 +43,11 @@ def check_mssql_blocked_sessions(_no_item, params, info):
return
state = 2
- for session_id, wait_duration_ms, wait_type, blocking_session_id in info[1:]:
+ for line in info:
+ if "blocked" in line[0].lower():
+ continue # Skip debug output which was send by old agent by accident
+ session_id, wait_duration_ms, wait_type, blocking_session_id = line
+
if params:
state = params.get("state", 2)
warn, crit = params.get("waittime", (0, 0))