forked from TrueCloudLab/frostfs-testlib
28 lines
813 B
Python
28 lines
813 B
Python
from typing import Any
|
|
|
|
from frostfs_testlib.reporter.allure_handler import AllureHandler
|
|
from frostfs_testlib.reporter.interfaces import ReporterHandler
|
|
from frostfs_testlib.reporter.reporter import Reporter
|
|
from frostfs_testlib.reporter.steps_logger import StepsLogger
|
|
|
|
__reporter = Reporter()
|
|
|
|
|
|
def get_reporter() -> Reporter:
|
|
"""Returns reporter that the library should use for storing artifacts.
|
|
|
|
Reporter is a singleton instance that can be configured with multiple handlers that store
|
|
artifacts in various systems. Most common use case is to use single handler.
|
|
|
|
Returns:
|
|
Singleton reporter instance.
|
|
"""
|
|
return __reporter
|
|
|
|
|
|
def step(title: str):
|
|
return __reporter.step(title)
|
|
|
|
|
|
def attach(content: Any, file_name: str):
|
|
return __reporter.attach(content, file_name)
|