From 51e39d536d9210dbae285f330a8ecb697d52aac6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 4 Dec 2020 05:32:06 -0500 Subject: manifest_xml: harmonize list fields We allow project.groups to be whitespace or comma delimited, but repo-hooks.enabled-list is only whitespace delimited. This hasn't been a big deal as it's only ever had one valid value, but if we want to add more, we should harmonize these a bit. Refactor the groups method to be more generic, and run the enabled- list attribute through it. Then add missing docs for it. Change-Id: Iaa96a0faa9c4a68b313b49336751831b73bf855d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/290743 Reviewed-by: Michael Mortensen Tested-by: Mike Frysinger --- tests/test_manifest_xml.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test_manifest_xml.py') diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 939717be..2a8c3f66 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py @@ -212,6 +212,19 @@ class XmlManifestTests(unittest.TestCase): '') self.assertEqual(manifest.ToDict(), {}) + def test_repo_hooks(self): + """Check repo-hooks settings.""" + manifest = self.getXmlManifest(""" + + + + + + +""") + self.assertEqual(manifest.repo_hooks_project.name, 'repohooks') + self.assertEqual(manifest.repo_hooks_project.enabled_repo_hooks, ['a', 'b']) + def test_project_group(self): """Check project group settings.""" manifest = self.getXmlManifest(""" -- cgit v1.2.3-54-g00ecf