summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorlucasmoura <lucas.moura@canonical.com>2020-05-06 17:19:35 -0300
committerGitHub <noreply@github.com>2020-05-06 14:19:35 -0600
commit022122a54e895468d054ed162fdf1b403b7aaf3f (patch)
tree1afbfe9394ca1f9f8f3374c63ca4b6c32457aca8 /cloudinit/config
parent73d8748e797134fa0a06415b6cb16be2e05abc7e (diff)
downloadvyos-cloud-init-022122a54e895468d054ed162fdf1b403b7aaf3f.tar.gz
vyos-cloud-init-022122a54e895468d054ed162fdf1b403b7aaf3f.zip
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
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_snap.py4
1 files changed, 2 insertions, 2 deletions
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 <snap-user>@mydomain.com
01: snap install canonical-livepatch