Skip to content
Permalink
Browse files

crashtest: Skip local check AND inventory plugins; Temporarily disabl…

…ed discovery

Change-Id: I5be50551699abb564809ab2afdb02e4e98966eec
  • Loading branch information...
Simon Jess
Simon Jess committed Jun 11, 2019
1 parent e618d7d commit 288026f6f3de8dcf7068f2a383df92cb8333fe74
Showing with 11 additions and 10 deletions.
  1. +11 −10 tests/unit/checks/generictests/crashtest.py
@@ -38,7 +38,7 @@

import generictests
from generictests.regression import WritableDataset
from checktestlib import CheckResult, DiscoveryResult
from checktestlib import CheckResult

pytestmark = pytest.mark.checks

@@ -64,7 +64,7 @@ def __init__(self, crash_report_fn):

traceback = crashinfo.get('exc_traceback', [])
for line in traceback:
if '/local/share/check_mk/checks/' in line[0]:
if '/local/share/check_mk/' in line[0]:
raise SkipReport("local check plugin")

init_dict = {}
@@ -135,7 +135,7 @@ def _iter_applicable_crashes(self):
try:
yield CrashDataset(crash_report_fn)
except SkipReport as exc:
item[1] = 'SKIP (%s)' % exc
item[1] = 'SKIP %s (%s)' % (item[2], exc)

def load(self):
try:
@@ -151,13 +151,14 @@ def test_crashreport(check_manager, crashdata):
try:
generictests.run(check_manager, crashdata)
check = check_manager.get_check(crashdata.full_checkname)
if crashdata.is_discovery:
if crashdata.parsed:
raw_result = check.run_discovery(crashdata.parsed)
else:
raw_result = check.run_discovery(crashdata.info)
print(DiscoveryResult(raw_result))
return
#FIXME
#if crashdata.is_discovery:
# if crashdata.parsed:
# raw_result = check.run_discovery(crashdata.parsed)
# else:
# raw_result = check.run_discovery(crashdata.info)
# print(DiscoveryResult(raw_result))
# return

if 'item' in crashdata.vars:
item = crashdata.vars['item']

0 comments on commit 288026f

Please sign in to comment.
You can’t perform that action at this time.