mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-16 13:56:11 +08:00
Additional tests for validate_koji_tag:
- Verify that ProgrammingError exception does what it is intended to do. - Two (str/list) negative tests for validate_koji_tag decorator itself. - Two (str/list) positive tests for validate_koji_tag decorator itself. - Support validation in a test for Koji builder.
This commit is contained in:
@@ -66,7 +66,7 @@ class TestKojiBuilder(unittest.TestCase):
|
||||
module='nginx',
|
||||
config=conf,
|
||||
tag_name='module-nginx-1.2')
|
||||
fake_kmb.module_target = {'build_tag': 'fake_tag'}
|
||||
fake_kmb.module_target = {'build_tag': 'module-fake_tag'}
|
||||
|
||||
with self.assertRaises(IOError):
|
||||
fake_kmb.buildroot_ready()
|
||||
@@ -117,5 +117,6 @@ class FakeKojiSession(koji.ClientSession):
|
||||
def _setup_connection(self):
|
||||
pass
|
||||
|
||||
@module_build_service.utils.validate_koji_tag('tag')
|
||||
def getRepo(self, tag):
|
||||
return {'create_event': 'fake event'}
|
||||
|
||||
Reference in New Issue
Block a user