diff --git a/plugins/hub/osbuild.py b/plugins/hub/osbuild.py index 2b2d109..b280bbe 100644 --- a/plugins/hub/osbuild.py +++ b/plugins/hub/osbuild.py @@ -69,6 +69,7 @@ OSBUILD_IMAGE_SCHEMA = { "title": "Repository options", "type": "object", "additionalProperties": False, + "required": ["baseurl"], "properties": { "baseurl": { "type": "string" diff --git a/test/unit/test_hub.py b/test/unit/test_hub.py index 65c10b7..e00351c 100644 --- a/test/unit/test_hub.py +++ b/test/unit/test_hub.py @@ -111,6 +111,24 @@ class TestHubPlugin(PluginTest): ["arches"] ], "opts": {} + }, + # repo without `baseurl` is not allowed + { + "args": [ + "name", + "version", + "distro", + "image_type", + "target", + ["arches"] + ], + "opts": { + "repo": [ + { + "package_sets": ["set1", "set2"] + } + ] + } } ]