From fd986bfed13e9b53f34cb8dedf455aed25c7dd3a Mon Sep 17 00:00:00 2001 From: Kamil Braun Date: Fri, 16 Sep 2022 16:16:04 +0200 Subject: [PATCH] test: setup logging in topology suites Make it possible to use logging from within tests in the topology suites. The tests are executed using `pytest`, which uses a `pytest.ini` file for logging configuration. Also cleanup the `pytest.ini` files a bit. --- test/topology/pytest.ini | 9 ++++----- test/topology_raft_disabled/pytest.ini | 6 ++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/topology/pytest.ini b/test/topology/pytest.ini index 572da80da3..b30709fa23 100644 --- a/test/topology/pytest.ini +++ b/test/topology/pytest.ini @@ -1,7 +1,6 @@ -# Pytest configuration file. If we don't have one in this directory, -# pytest will look for one in our ancestor directories, and may find -# something irrelevant. So we should have one here, even if empty. [pytest] -# Use shared fixtures from the parent dir -addopts = --confcutdir .. asyncio_mode = auto + +log_cli = true +log_format = %(asctime)s %(levelname)s %(message)s +log_date_format = %Y-%m-%d %H:%M:%S diff --git a/test/topology_raft_disabled/pytest.ini b/test/topology_raft_disabled/pytest.ini index 572da80da3..972b9e1665 100644 --- a/test/topology_raft_disabled/pytest.ini +++ b/test/topology_raft_disabled/pytest.ini @@ -2,6 +2,8 @@ # pytest will look for one in our ancestor directories, and may find # something irrelevant. So we should have one here, even if empty. [pytest] -# Use shared fixtures from the parent dir -addopts = --confcutdir .. asyncio_mode = auto + +log_cli = true +log_format = %(asctime)s %(levelname)s %(message)s +log_date_format = %Y-%m-%d %H:%M:%S