diff options
-rw-r--r-- | cloudinit/config/tests/test_snap.py | 5 | ||||
-rw-r--r-- | cloudinit/config/tests/test_ubuntu_advantage.py | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cloudinit/config/tests/test_snap.py b/cloudinit/config/tests/test_snap.py index 988e7f7c..c5b4a9de 100644 --- a/cloudinit/config/tests/test_snap.py +++ b/cloudinit/config/tests/test_snap.py @@ -8,7 +8,8 @@ from cloudinit.config.cc_snap import ( run_commands, schema) from cloudinit.config.schema import validate_cloudconfig_schema from cloudinit import util -from cloudinit.tests.helpers import CiTestCase, mock, wrap_and_call +from cloudinit.tests.helpers import ( + CiTestCase, mock, wrap_and_call, skipUnlessJsonSchema) SYSTEM_USER_ASSERTION = """\ @@ -243,6 +244,7 @@ class TestRunCommands(CiTestCase): self.assertEqual('MOM\nHI\n', util.load_file(outfile)) +@skipUnlessJsonSchema() class TestSchema(CiTestCase): with_logs = True @@ -418,6 +420,7 @@ class TestHandle(CiTestCase): util.load_file(compare_file), util.load_file(assert_file)) @mock.patch('cloudinit.config.cc_snap.util.subp') + @skipUnlessJsonSchema() def test_handle_validates_schema(self, m_subp): """Any provided configuration is runs validate_cloudconfig_schema.""" assert_file = self.tmp_path('snapd.assertions', dir=self.tmp) diff --git a/cloudinit/config/tests/test_ubuntu_advantage.py b/cloudinit/config/tests/test_ubuntu_advantage.py index 0eeadd43..f2a59faf 100644 --- a/cloudinit/config/tests/test_ubuntu_advantage.py +++ b/cloudinit/config/tests/test_ubuntu_advantage.py @@ -7,7 +7,7 @@ from cloudinit.config.cc_ubuntu_advantage import ( handle, maybe_install_ua_tools, run_commands, schema) from cloudinit.config.schema import validate_cloudconfig_schema from cloudinit import util -from cloudinit.tests.helpers import CiTestCase, mock +from cloudinit.tests.helpers import CiTestCase, mock, skipUnlessJsonSchema # Module path used in mocks @@ -104,6 +104,7 @@ class TestRunCommands(CiTestCase): self.assertEqual('MOM\nHI\n', util.load_file(outfile)) +@skipUnlessJsonSchema() class TestSchema(CiTestCase): with_logs = True |