mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 01:50:35 +00:00
1. test.py — Removed --log-level=DEBUG flag from pytest args
2. test/pytest.ini — Changed log_level to INFO (that was set DEBUG in test.py), changed log_file_level from DEBUG to INFO, added clarifying comments
+minor fix
[test/pylib: save logs on success only during teardown phase](0ede308a04)
Previously, when --save-log-on-success was enabled, logs were saved
for every test phase (setup, call, teardown)in 3 files. Restrict it to only
the teardown phase, that contains all 3 in case of test success,
to avoid redundant log entries.
Closes scylladb/scylladb#29086
* github.com:scylladb/scylladb:
test/pylib: save logs on success only during teardown phase
test: Lower default log level from DEBUG to INFO
34 lines
942 B
Python
34 lines
942 B
Python
#
|
|
# Copyright (C) 2024-present ScyllaDB
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
|
|
#
|
|
|
|
import allure
|
|
import pytest
|
|
from test import TEST_RUNNER
|
|
from test.pylib.report_plugin import ReportPlugin
|
|
from test.pylib.skip_reason_plugin import SkipReasonPlugin
|
|
from test.pylib.skip_types import SkipType
|
|
|
|
|
|
pytest_plugins = []
|
|
|
|
if TEST_RUNNER == "runpy":
|
|
@pytest.fixture(scope="session")
|
|
def testpy_test() -> None:
|
|
return None
|
|
else:
|
|
pytest_plugins.append("test.pylib.runner")
|
|
|
|
|
|
def pytest_configure(config: pytest.Config) -> None:
|
|
config.pluginmanager.register(ReportPlugin())
|
|
|
|
def _allure_report(skip_type: str, reason: str) -> None:
|
|
"""Enrich Allure reports with skip type metadata."""
|
|
allure.dynamic.tag(f"skip_type:{skip_type}")
|
|
allure.dynamic.label("skip_type", skip_type)
|
|
|
|
config.pluginmanager.register(SkipReasonPlugin(SkipType, report_callback=_allure_report))
|