# --- BEGIN COPYRIGHT BLOCK --- # Copyright (C) 2017 Red Hat, Inc. # All rights reserved. # # License: GPL (version 3 or any later version). # See LICENSE for details. # --- END COPYRIGHT BLOCK --- # import pytest from lib389.dseldif import DSEldif from lib389._constants import DN_CONFIG, LOG_REPLICA, LOG_DEFAULT, LOG_TRACE, LOG_ACL from lib389.utils import os, logging from lib389.topologies import topology_st as topo DEBUGGING = os.getenv("DEBUGGING", default=False) if DEBUGGING: logging.getLogger(__name__).setLevel(logging.DEBUG) else: logging.getLogger(__name__).setLevel(logging.INFO) log = logging.getLogger(__name__) @pytest.mark.bz1460718 @pytest.mark.parametrize("log_level", [(LOG_REPLICA + LOG_DEFAULT), (LOG_ACL + LOG_DEFAULT), (LOG_TRACE + LOG_DEFAULT)]) def test_default_loglevel_stripped(topo, log_level): """The default log level 16384 is stripped from the log level returned to a client :id: c300f8f1-aa11-4621-b124-e2be51930a6b
from lib389.tasks import ImportTask from lib389.index import Indexes from lib389.plugins import AttributeUniquenessPlugin from lib389.config import BDB_LDBMConfig from lib389.monitor import MonitorLDBM from lib389.topologies import create_topology, _remove_ssca_db pytestmark = pytest.mark.tier2 db_locks_monitoring_ack = pytest.mark.skipif( not os.environ.get('DB_LOCKS_MONITORING_ACK', False), reason= "DB locks monitoring tests may take hours if the feature is not present or another failure exists. " "Also, the feature requires a big amount of space as we set nsslapd-db-locks to 1300000." ) DEBUGGING = os.getenv('DEBUGGING', default=False) if DEBUGGING: logging.getLogger(__name__).setLevel(logging.DEBUG) else: logging.getLogger(__name__).setLevel(logging.INFO) log = logging.getLogger(__name__) def _kill_ns_slapd(inst): pid = str(pid_from_file(inst.ds_paths.pid_file)) cmd = ['kill', '-9', pid] subprocess.Popen(cmd, stdout=subprocess.PIPE) @pytest.fixture(scope="function") def topology_st_fn(request):