Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,20 @@ def pytest_assertrepr_compare(op, left, right):
'"{}" not in cloud-init.log string; unexpectedly found on'
" these lines:".format(left)
] + found_lines


def pytest_configure(config):
"""Perform initial configuration, before the test runs start.

This hook is only called if integration tests are being executed, so we can
use it to configure defaults for integration testing that differ from the
rest of the tests in the codebase.

See
https://docs.pytest.org/en/latest/reference.html#_pytest.hookspec.pytest_configure
for pytest's documentation.
"""
if "log_cli_level" in config.option and not config.option.log_cli_level:
# If log_cli_level is available in this version of pytest and not set
# to anything, set it to INFO.
config.option.log_cli_level = "INFO"