From 022122a54e895468d054ed162fdf1b403b7aaf3f Mon Sep 17 00:00:00 2001 From: lucasmoura Date: Wed, 6 May 2020 17:19:35 -0300 Subject: Create tests to validate schema examples (#348) Add a unit test to validate if the examples provided in the config modules are conforming to the concatenated schema of all config modules. The rationale behind that is not only to verify if the examples are correctly written but to assert that no config schema is interfering with each other. Failures in validate_cloudconfig_schema raise the SchemaValidationError by using strict=True, so I have only called the function passing the right schema examples to validate. This branch also fixes an invalid schema example in cc_snap. LP: #1876412 --- cloudinit/config/cc_snap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/config/cc_snap.py') diff --git a/cloudinit/config/cc_snap.py b/cloudinit/config/cc_snap.py index 90724b81..fbe7787a 100644 --- a/cloudinit/config/cc_snap.py +++ b/cloudinit/config/cc_snap.py @@ -61,9 +61,9 @@ schema = { snap: assertions: 00: | - signed_assertion_blob_here + signed_assertion_blob_here 02: | - signed_assertion_blob_here + signed_assertion_blob_here commands: 00: snap create-user --sudoer --known @mydomain.com 01: snap install canonical-livepatch -- cgit v1.2.3