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