diff options
author | Chad Smith <chad.smith@canonical.com> | 2020-04-24 14:39:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 14:39:25 -0600 |
commit | 61a19249c2010743a467a51f8f0750712c2d92e0 (patch) | |
tree | 480e5807d6ab5c0033fd51ad65b3996648e79653 /tests/unittests/test_cli.py | |
parent | 72f6eb0339f7fcf7b8b02be2e86e5f7477cf731c (diff) | |
download | vyos-cloud-init-61a19249c2010743a467a51f8f0750712c2d92e0.tar.gz vyos-cloud-init-61a19249c2010743a467a51f8f0750712c2d92e0.zip |
schema: add json schema for write_files module (#152)
Add schema definition to cc_write_files.py
Cloud-config containing write_files config directives will now
emit warnings for invalid config keys or values for the write_files
module.
Add an extension to JSON schema's draft4validator to permit either
binary or text values for 'string' objects.
This allows for JSON schema validating the YAML declaration of binary
valiues in cloud-config using YAML's '!!binary' syntax.
Add the ability to pass a specific module name to
`cloud-init devel schema --docs <module_name>|all` to optionally
limit doc output during development to a single schema doc.
Diffstat (limited to 'tests/unittests/test_cli.py')
-rw-r--r-- | tests/unittests/test_cli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_cli.py b/tests/unittests/test_cli.py index e57c15d1..43d996b9 100644 --- a/tests/unittests/test_cli.py +++ b/tests/unittests/test_cli.py @@ -214,14 +214,14 @@ class TestCLI(test_helpers.FilesystemMockingTestCase): self.assertEqual(1, exit_code) # Known whitebox output from schema subcommand self.assertEqual( - 'Expected either --config-file argument or --doc\n', + 'Expected either --config-file argument or --docs\n', self.stderr.getvalue()) def test_wb_devel_schema_subcommand_doc_content(self): """Validate that doc content is sane from known examples.""" stdout = io.StringIO() self.patchStdoutAndStderr(stdout=stdout) - self._call_main(['cloud-init', 'devel', 'schema', '--doc']) + self._call_main(['cloud-init', 'devel', 'schema', '--docs', 'all']) expected_doc_sections = [ '**Supported distros:** all', '**Supported distros:** centos, debian, fedora', |