test/hub: validate the jsonschema

Validate the json schema used to validate the input arguments. So
much validation!
This commit is contained in:
Christian Kellner 2020-09-16 12:44:02 +02:00
parent d0d167d2f8
commit 6b4632385a

View file

@ -2,6 +2,7 @@
# koji hub plugin unit tests
#
import jsonschema
import koji
from flexmock import flexmock
@ -32,6 +33,12 @@ class TestHubPlugin(PluginTest):
.with_args("osbuildImage", args, **task)
return kojihub
def test_plugin_jsonschema(self):
# Make sure the schema used to validate the input is
# itself correct jsonschema
schema = self.plugin.OSBUILD_IMAGE_SCHEMA
jsonschema.Draft4Validator.check_schema(schema)
def test_basic(self):
context = self.mock_koji_context()