jenkins-bot has submitted this change and it was merged.

Change subject: test: support state of Gerrit repositories
......................................................................


test: support state of Gerrit repositories

Change-Id: Ia7475a21ae42545eeb41f71d6964c419c32f5365
---
M tests/test_zuul_coverage.py
1 file changed, 9 insertions(+), 7 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/test_zuul_coverage.py b/tests/test_zuul_coverage.py
index a3619e1..be548d1 100644
--- a/tests/test_zuul_coverage.py
+++ b/tests/test_zuul_coverage.py
@@ -25,10 +25,10 @@
             'https://gerrit.wikimedia.org/r/projects/?type=code&description')
         # Strip Gerrit json harness: )]}'
         req.readline()
-        cls._repos = sorted([
-            name for (name, meta) in json.load(req).iteritems()
-            if meta['state'] == 'ACTIVE'
-        ])
+        cls._repos = {
+            name: meta['state']
+            for (name, meta) in json.load(req).iteritems()
+        }
 
     def getLayoutProjects(self):
         layout = os.path.join(
@@ -40,12 +40,14 @@
 
     def assert_have_gate_and_submit(self, prefix):
         projects = self.getLayoutProjects()
-        missing = [repo for repo in self._repos
-                   if repo.startswith(prefix) and repo not in projects]
+        missing = [repo for (repo, state) in self._repos.iteritems()
+                   if repo.startswith(prefix)
+                   and state == 'ACTIVE'
+                   and repo not in projects]
 
         self.longMessage = True
         self.assertEqual(
-            [], missing,
+            [], sorted(missing),
             '%s %s are not configured in zuul' % (len(missing), prefix))
 
     def test_all_extensions_have_gate_and_submit(self):

-- 
To view, visit https://gerrit.wikimedia.org/r/323856
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7475a21ae42545eeb41f71d6964c419c32f5365
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to