summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unittests/config/test_schema.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unittests/config/test_schema.py b/tests/unittests/config/test_schema.py
index 5cb00c5d..1647f6e5 100644
--- a/tests/unittests/config/test_schema.py
+++ b/tests/unittests/config/test_schema.py
@@ -234,9 +234,12 @@ class TestValidateCloudConfigSchema:
"""When strict is False validate_cloudconfig_schema emits warnings."""
schema = {"properties": {"p1": {"type": "string"}}}
validate_cloudconfig_schema({"p1": -1}, schema, strict=False)
+ [(module, log_level, log_msg)] = caplog.record_tuples
+ assert "cloudinit.config.schema" == module
+ assert logging.WARNING == log_level
assert (
- "Invalid cloud-config provided:\np1: -1 is not of type 'string'\n"
- in (caplog.text)
+ "Invalid cloud-config provided:\np1: -1 is not of type 'string'"
+ == log_msg
)
@skipUnlessJsonSchema()