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
4 changes: 2 additions & 2 deletions tests/unittests/config/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ def test_validateconfig_schema_non_strict_emits_warnings(self, caplog):
"""When strict is False validate_cloudconfig_schema emits warnings."""
schema = {"properties": {"p1": {"type": "string"}}}
validate_cloudconfig_schema({"p1": -1}, schema=schema, strict=False)
assert (
caplog.record_tuples and len(caplog.record_tuples) == 1
assert caplog.record_tuples and (
len(caplog.record_tuples) == 1 or len(caplog.record_tuples) == 2
Comment on lines +454 to +455
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not personally a fan of logging tests for the brittleness which this problem demonstrates.

), caplog.record_tuples
[(module, log_level, log_msg)] = caplog.record_tuples
assert "cloudinit.config.schema" == module
Expand Down
Loading