def testconfig(request, config):
    Globals.alone = request.param[1]
    if Globals.alone:
        config.set('global', 'sections', Globals.section)
    else:
        config.set('global', 'sections', '%s systemtime' % Globals.section)
    config.set('global', 'crash_debug', 'yes')
    config.add_section(Globals.section)
    Globals.config_param_in_use = request.param[0]
    tag = '' if request.param[0] == 'default' else '%s ' % request.param[0]
    config.set(Globals.section, 'textfile',
               '%s%s|%s%s' % (tag, Globals.testlog1, tag, Globals.testlog2))
    return config
예제 #2
0
def testconfig(request, config):
    Globals.alone = request.param == 'alone'
    if Globals.alone:
        config.set('global', 'sections', Globals.section)
    else:
        config.set('global', 'sections', '%s systemtime' % Globals.section)
    config.set('global', 'crash_debug', 'yes')
    config.add_section(Globals.section)
    if Globals.newline < 0:
        config.set(Globals.section, 'check',
                   '%s %s' % (Globals.checkname, os.path.join(Globals.mrpedir, Globals.pluginname)))
    else:
        config.set(Globals.section, 'include', os.path.join(Globals.includedir, Globals.cfgfile))
    return config
예제 #3
0
def testconfig(config):
    config.set('global', 'crash_debug', 'yes')
    if Globals.param[0] == 'showconfig':
        config.set('global', 'sections', ' '.join(Globals.sections))
        for section in filter(lambda s: s != 'check_mk', Globals.sections):
            config.add_section(section)
        config.set('fileinfo', 'path', os.path.join(remotedir, '*.log'))
        config.set('logfiles', 'textfile', 'from_start %s|nocontext %s' % Globals.testlogs)
        config.set('logfiles', 'crit', 'e*o?')
        config.set('logwatch', 'vista_api', 'yes')
        config.set('logwatch', 'logfile Application', 'warn')
        for pluginname in Globals.pluginnames:
            config.set(Globals.plugintype, 'execution %s' % pluginname, 'async')
            config.set(Globals.plugintype, 'timeout %s' % pluginname, '10')
            config.set(Globals.plugintype, 'cache_age %s' % pluginname, '300')
            config.set(Globals.plugintype, 'retry_count %s' % pluginname, '3')
    return config
예제 #4
0
def testconfig(request, config):
    config.set('global', 'sections', Globals.section)
    config.set('global', 'crash_debug', 'yes')
    config.add_section(Globals.section)
    config.set(Globals.section, 'use_wmi', request.param)
    return config