Merge lp:~noskcaj/ubuntu/vivid/fedmsg-meta-fedora-infrastructure/disable-tests into lp:ubuntu/vivid/fedmsg-meta-fedora-infrastructure

Proposed by Jackson Doak
Status: Work in progress
Proposed branch: lp:~noskcaj/ubuntu/vivid/fedmsg-meta-fedora-infrastructure/disable-tests
Merge into: lp:ubuntu/vivid/fedmsg-meta-fedora-infrastructure
Diff against target: 872 lines (+577/-26)
19 files modified
PKG-INFO (+1/-1)
debian/changelog (+12/-0)
debian/control (+2/-1)
debian/rules (+4/-0)
fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO (+1/-1)
fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt (+2/-0)
fedmsg_meta_fedora_infrastructure/coprs.py (+1/-1)
fedmsg_meta_fedora_infrastructure/fedimg.py (+32/-15)
fedmsg_meta_fedora_infrastructure/fedoracollege.py (+77/-0)
fedmsg_meta_fedora_infrastructure/github.py (+12/-1)
fedmsg_meta_fedora_infrastructure/jenkins.py (+6/-0)
fedmsg_meta_fedora_infrastructure/pkgdb.py (+26/-1)
fedmsg_meta_fedora_infrastructure/tests/coprs.py (+3/-1)
fedmsg_meta_fedora_infrastructure/tests/fedimg.py (+31/-0)
fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py (+167/-0)
fedmsg_meta_fedora_infrastructure/tests/github.py (+82/-0)
fedmsg_meta_fedora_infrastructure/tests/jenkins.py (+78/-0)
fedmsg_meta_fedora_infrastructure/tests/pkgdb.py (+39/-3)
setup.py (+1/-1)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/vivid/fedmsg-meta-fedora-infrastructure/disable-tests
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Needs Information
Review via email: mp+251324@code.launchpad.net

Description of the change

Disable tests because they need web access. (So offline tests still run)
Is this change ok?

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

The change looks good to me as there is no other alternatives (or maybe marked all tests as skipped, but it seems they all need network connection).

Do you mind just noting in debian/rules on top of the override_dh_auto_test the reason? (it's easier than diving into the changelog)

Then, just ping me and I'll sponsor, thanks!

review: Needs Information
6. By Jackson Doak

Add comment to d/rules

Unmerged revisions

6. By Jackson Doak

Add comment to d/rules

5. By Jackson Doak

Disable tests because they need an internet connection

4. By Nicolas Dandrimont <email address hidden>

New upstream release

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'PKG-INFO'
2--- PKG-INFO 2014-07-14 22:20:38 +0000
3+++ PKG-INFO 2015-04-03 19:43:46 +0000
4@@ -1,6 +1,6 @@
5 Metadata-Version: 1.0
6 Name: fedmsg_meta_fedora_infrastructure
7-Version: 0.2.15
8+Version: 0.2.18
9 Summary: fedmsg metadata providers for Fedora Infrastructure's deployment
10 Home-page: https://github.com/ralphbean/fedmsg_meta_fedora_infrastructure/
11 Author: Ralph Bean
12
13=== modified file 'debian/changelog'
14--- debian/changelog 2014-07-14 22:20:38 +0000
15+++ debian/changelog 2015-04-03 19:43:46 +0000
16@@ -1,3 +1,15 @@
17+fedmsg-meta-fedora-infrastructure (0.2.18-1ubuntu1) vivid; urgency=medium
18+
19+ * Disable tests because they need an internet connection
20+
21+ -- Jackson Doak <noskcaj@ubuntu.com> Sat, 28 Feb 2015 06:38:22 +1100
22+
23+fedmsg-meta-fedora-infrastructure (0.2.18-1) unstable; urgency=medium
24+
25+ * New upstream release
26+
27+ -- Nicolas Dandrimont <olasd@debian.org> Sat, 16 Aug 2014 00:57:05 +0200
28+
29 fedmsg-meta-fedora-infrastructure (0.2.15-1) unstable; urgency=medium
30
31 * New upstream release
32
33=== modified file 'debian/control'
34--- debian/control 2014-05-18 18:33:16 +0000
35+++ debian/control 2015-04-03 19:43:46 +0000
36@@ -1,7 +1,8 @@
37 Source: fedmsg-meta-fedora-infrastructure
38 Section: python
39 Priority: optional
40-Maintainer: Nicolas Dandrimont <olasd@debian.org>
41+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
42+XSBC-Original-Maintainer: Nicolas Dandrimont <olasd@debian.org>
43 Build-Depends: debhelper (>= 9),
44 dh-python,
45 python-all,
46
47=== modified file 'debian/rules'
48--- debian/rules 2014-05-18 18:33:16 +0000
49+++ debian/rules 2015-04-03 19:43:46 +0000
50@@ -1,3 +1,7 @@
51 #!/usr/bin/make -f
52+
53 %:
54 dh $@ --with python2 --buildsystem=pybuild
55+
56+# Disable tests because they need an internet connection
57+dh_auto_test:
58
59=== modified file 'fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO'
60--- fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO 2014-07-14 22:20:38 +0000
61+++ fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO 2015-04-03 19:43:46 +0000
62@@ -1,6 +1,6 @@
63 Metadata-Version: 1.0
64 Name: fedmsg-meta-fedora-infrastructure
65-Version: 0.2.15
66+Version: 0.2.18
67 Summary: fedmsg metadata providers for Fedora Infrastructure's deployment
68 Home-page: https://github.com/ralphbean/fedmsg_meta_fedora_infrastructure/
69 Author: Ralph Bean
70
71=== modified file 'fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt'
72--- fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt 2014-07-14 22:20:38 +0000
73+++ fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt 2015-04-03 19:43:46 +0000
74@@ -23,6 +23,7 @@
75 fedmsg_meta_fedora_infrastructure/fasshim.py
76 fedmsg_meta_fedora_infrastructure/fedimg.py
77 fedmsg_meta_fedora_infrastructure/fedocal.py
78+fedmsg_meta_fedora_infrastructure/fedoracollege.py
79 fedmsg_meta_fedora_infrastructure/fmn.py
80 fedmsg_meta_fedora_infrastructure/github.py
81 fedmsg_meta_fedora_infrastructure/jenkins.py
82@@ -59,6 +60,7 @@
83 fedmsg_meta_fedora_infrastructure/tests/elections.py
84 fedmsg_meta_fedora_infrastructure/tests/fedimg.py
85 fedmsg_meta_fedora_infrastructure/tests/fedocal.py
86+fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py
87 fedmsg_meta_fedora_infrastructure/tests/fmn.py
88 fedmsg_meta_fedora_infrastructure/tests/ftpsync.py
89 fedmsg_meta_fedora_infrastructure/tests/github.py
90
91=== modified file 'fedmsg_meta_fedora_infrastructure/coprs.py'
92--- fedmsg_meta_fedora_infrastructure/coprs.py 2014-07-14 22:20:38 +0000
93+++ fedmsg_meta_fedora_infrastructure/coprs.py 2015-04-03 19:43:46 +0000
94@@ -48,7 +48,7 @@
95 tmpl = self._("{user} started a new build of the {copr} copr")
96 elif 'copr.build.end' in msg['topic']:
97 tmpl = self._(
98- "{user}'s {copr} copr build finished with '{status}'")
99+ "{user}'s {copr} copr build finished {chroot} with '{status}'")
100 elif 'copr.chroot.start' in msg['topic']:
101 tmpl = self._("{user}'s {copr} copr started a new {chroot} chroot")
102 elif 'copr.worker.create' in msg['topic']:
103
104=== modified file 'fedmsg_meta_fedora_infrastructure/fedimg.py'
105--- fedmsg_meta_fedora_infrastructure/fedimg.py 2014-07-14 22:20:38 +0000
106+++ fedmsg_meta_fedora_infrastructure/fedimg.py 2015-04-03 19:43:46 +0000
107@@ -30,18 +30,35 @@
108 __obj__ = "New cloud image upload"
109
110 def subtitle(self, msg, **config):
111- if msg['msg']['status'] is "started":
112- name = msg['msg']['image_name']
113- dest = msg['msg']['destination']
114- tmpl = self._('Image {image_name} started uploading to {dest}')
115- return tmpl.format(image_name=name, dest=dest)
116- elif msg['msg']['status'] is "completed":
117- name = msg['msg']['image_name']
118- dest = msg['msg']['destination']
119- tmpl = self._('Image {image_name} finished uploading to to {dest}')
120- return tmpl.format(image_name=name, dest=dest)
121- elif msg['msg']['status'] is "failed":
122- name = msg['msg']['image_name']
123- dest = msg['msg']['destination']
124- tmpl = self._('Image {image_name} failed to upload to {dest}')
125- return tmpl.format(image_name=name, dest=dest)
126+ if 'image.upload' in msg['topic']:
127+ if msg['msg']['status'] is "started":
128+ name = msg['msg']['image_name']
129+ dest = msg['msg']['destination']
130+ tmpl = self._('Image {image_name} started uploading to {dest}')
131+ return tmpl.format(image_name=name, dest=dest)
132+ elif msg['msg']['status'] is "completed":
133+ name = msg['msg']['image_name']
134+ dest = msg['msg']['destination']
135+ tmpl = self._('Image {image_name} finished uploading to to {dest}')
136+ return tmpl.format(image_name=name, dest=dest)
137+ elif msg['msg']['status'] is "failed":
138+ name = msg['msg']['image_name']
139+ dest = msg['msg']['destination']
140+ tmpl = self._('Image {image_name} failed to upload to {dest}')
141+ return tmpl.format(image_name=name, dest=dest)
142+ if 'image.test' in msg['topic']:
143+ if msg['msg']['status'] is "started":
144+ name = msg['msg']['image_name']
145+ dest = msg['msg']['destination']
146+ tmpl = self._('Image {image_name} started testing on {dest}')
147+ return tmpl.format(image_name=name, dest=dest)
148+ elif msg['msg']['status'] is "completed":
149+ name = msg['msg']['image_name']
150+ dest = msg['msg']['destination']
151+ tmpl = self._('Image {image_name} finished testing on {dest}')
152+ return tmpl.format(image_name=name, dest=dest)
153+ elif msg['msg']['status'] is "failed":
154+ name = msg['msg']['image_name']
155+ dest = msg['msg']['destination']
156+ tmpl = self._('Image {image_name} failed testing on {dest}')
157+ return tmpl.format(image_name=name, dest=dest)
158
159=== added file 'fedmsg_meta_fedora_infrastructure/fedoracollege.py'
160--- fedmsg_meta_fedora_infrastructure/fedoracollege.py 1970-01-01 00:00:00 +0000
161+++ fedmsg_meta_fedora_infrastructure/fedoracollege.py 2015-04-03 19:43:46 +0000
162@@ -0,0 +1,77 @@
163+# This file is part of fedmsg.
164+# Copyright (C) 2014 Red Hat, Inc.
165+#
166+# fedmsg is free software; you can redistribute it and/or
167+# modify it under the terms of the GNU Lesser General Public
168+# License as published by the Free Software Foundation; either
169+# version 2.1 of the License, or (at your option) any later version.
170+#
171+# fedmsg is distributed in the hope that it will be useful,
172+# but WITHOUT ANY WARRANTY; without even the implied warranty of
173+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
174+# Lesser General Public License for more details.
175+#
176+# You should have received a copy of the GNU Lesser General Public
177+# License along with fedmsg; if not, write to the Free Software
178+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
179+#
180+#
181+# Authors: Hammad Haleem <hammadhaleem@gmail.com>
182+'''Preprocessor for fedora college'''
183+
184+from fedmsg_meta_fedora_infrastructure import BaseProcessor
185+from .fasshim import gravatar_url
186+
187+
188+class FedoraCollegeProcessor(BaseProcessor):
189+ __name__ = "FedoraCollege"
190+ __description__ = "The virtual Classroom for new fedora contributors"
191+ __obj__ = "Delivering video tutorials"
192+
193+ '''
194+ currently not in production
195+ __link__ = "https://ask.fedoraproject.org"
196+ __docs__ = "https://askbot.com"
197+ __icon__ = "https://apps.fedoraproject.org/img/icons/ask_fedora.png"
198+ '''
199+
200+ def subtitle(self, msg, **config):
201+
202+ username = msg['msg']['username']
203+ title = msg['msg']['title']
204+
205+ if "fedoracollege.media.upload" in msg['topic']:
206+ tmpl = self._(
207+ '{username} uploaded a new file of type "{title}"')
208+ elif "fedoracollege.content.added" in msg['topic']:
209+ tmpl = self._(
210+ '{username} Created new content titled "{title}"')
211+ elif "fedoracollege.content.edit" in msg['topic']:
212+ tmpl = self._(
213+ '{username} Edited content titled "{title}"')
214+ else:
215+ raise NotImplementedError("%r" % msg)
216+
217+ return tmpl.format(username=username, title=title)
218+
219+ def secondary_icon(self, msg, **config):
220+ user = None
221+
222+ try:
223+ user = msg['msg']['username']
224+ except KeyError:
225+ pass
226+
227+ if not user:
228+ return ""
229+
230+ return gravatar_url(username=user)
231+
232+ def usernames(self, msg, **config):
233+ if 'username' in msg['msg']:
234+ return set([msg['msg']['username']])
235+
236+ return set()
237+
238+ def link(self, msg, **config):
239+ return msg['msg']['link']
240
241=== modified file 'fedmsg_meta_fedora_infrastructure/github.py'
242--- fedmsg_meta_fedora_infrastructure/github.py 2014-07-14 22:20:38 +0000
243+++ fedmsg_meta_fedora_infrastructure/github.py 2015-04-03 19:43:46 +0000
244@@ -31,7 +31,9 @@
245
246 def _get_user(self, msg):
247 if msg['msg'].get('commit', None):
248- user = msg['msg']['commit'].get('author', {}).get('login', {})
249+ user = msg['msg']['commit'].get('author')
250+ if user:
251+ user = user.get('login')
252 if user:
253 return msg['msg']['fas_usernames'].get(user, user)
254 if msg['msg'].get('pusher', None):
255@@ -57,6 +59,8 @@
256 return None
257
258 def link(self, msg, **config):
259+ if 'github.watch' in msg['topic']:
260+ return msg['msg']['repository']['html_url'] + "/watchers"
261 if 'target_url' in msg['msg']:
262 return msg['msg']['target_url']
263 if 'compare' in msg['msg']:
264@@ -124,6 +128,10 @@
265 sha = msg['msg']['sha'][:8]
266 tmpl = self._("{description} for {repo} {sha}")
267 return tmpl.format(description=description, repo=repo, sha=sha)
268+ elif 'github.watch' in msg['topic']:
269+ tmpl = self._('{user} {action} watching {repo}')
270+ action = msg['msg']['action']
271+ return tmpl.format(user=user, repo=repo, action=action)
272 else:
273 pass
274
275@@ -148,6 +156,7 @@
276 'github.commit_comment': 'tree',
277 'github.create': None,
278 'github.delete': None,
279+ 'github.watch': None,
280 }
281
282 if suffix not in lookup:
283@@ -180,5 +189,7 @@
284 items = [msg['msg']['commit']['sha']]
285 elif suffix == 'github.commit_comment':
286 items = [msg['msg']['comment']['path']]
287+ elif suffix == 'github.watch':
288+ items = ['watchers']
289
290 return set([base + '/' + item for item in items])
291
292=== modified file 'fedmsg_meta_fedora_infrastructure/jenkins.py'
293--- fedmsg_meta_fedora_infrastructure/jenkins.py 2014-05-18 18:33:16 +0000
294+++ fedmsg_meta_fedora_infrastructure/jenkins.py 2015-04-03 19:43:46 +0000
295@@ -37,6 +37,12 @@
296 tmpl = self._("Jenkins project '{project}' failed to build")
297 elif 'jenkins.build.passed' in msg['topic']:
298 tmpl = self._("Jenkins project '{project}' built successfully")
299+ elif 'jenkins.build.unstable' in msg['topic']:
300+ tmpl = self._("Jenkins project '{project}' built with warnings")
301+ elif 'jenkins.build.notbuilt' in msg['topic']:
302+ tmpl = self._("Jenkins project '{project}' did not build")
303+ elif 'jenkins.build.aborted' in msg['topic']:
304+ tmpl = self._("Jenkins project '{project}' build aborted")
305 elif 'jenkins.build.start' in msg['topic']:
306 tmpl = self._("Jenkins project '{project}' started building")
307 else:
308
309=== modified file 'fedmsg_meta_fedora_infrastructure/pkgdb.py'
310--- fedmsg_meta_fedora_infrastructure/pkgdb.py 2014-07-14 22:20:38 +0000
311+++ fedmsg_meta_fedora_infrastructure/pkgdb.py 2015-04-03 19:43:46 +0000
312@@ -62,7 +62,7 @@
313 master = msg['msg']['master']
314 return tmpl.format(agent=agent, package=package,
315 branch=branch, master=master)
316- elif 'pkgdb.package.update' in msg['topic']:
317+ elif 'pkgdb.package.update.status' in msg['topic']:
318 tmpl = self._(u"{agent} {verb} {package}{extra}")
319 extra = ""
320
321@@ -90,6 +90,25 @@
322
323 return tmpl.format(agent=agent, package=package, verb=verb,
324 extra=extra)
325+ elif msg['topic'].endswith('pkgdb.package.update'):
326+ agent = get_agent(msg)
327+
328+ try:
329+ package = msg['msg']['package_listing']['package']['name']
330+ except KeyError:
331+ package = msg['msg']['package']
332+ if isinstance(package, dict):
333+ package = package['name']
334+
335+ if 'fields' in msg['msg']:
336+ # New pkgdb2 style
337+ tmpl = self._(u"{agent} updated: {fields} of {package}")
338+ fields = ', '.join(msg['msg'].get('fields'))
339+ return tmpl.format(agent=agent, package=package, fields=fields)
340+ else:
341+ # old old pkgdb1 style
342+ tmpl = self._(u"{agent} made some updates to {package}")
343+ return tmpl.format(agent=agent, package=package)
344 elif 'pkgdb.critpath.update' in msg['topic']:
345 tmpl = self._(
346 u"{agent} altered the critpath status for some packages")
347@@ -296,6 +315,8 @@
348 package = _msg['package_listing']['package']['name']
349 except KeyError:
350 package = _msg['package']
351+ if isinstance(package, dict):
352+ package = package['name']
353 objs.add('{package}/update'.format(package=package))
354 elif 'pkgdb.branch.clone' in msg['topic']:
355 objs.add('{package}/branch'.format(package=_msg['package']))
356@@ -319,6 +340,8 @@
357 try:
358 if isinstance(msg['msg']['package'], basestring):
359 packages.add(msg['msg']['package'])
360+ else:
361+ packages.add(msg['msg']['package']['name'])
362 except KeyError:
363 pass
364
365@@ -353,6 +376,8 @@
366 package = msg['msg']['package_listing']['package']['name']
367 except KeyError:
368 package = msg['msg']['package']
369+ if isinstance(package, dict):
370+ package = package['name']
371 return tmpl.format(package=package)
372
373 return ""
374
375=== modified file 'fedmsg_meta_fedora_infrastructure/tests/coprs.py'
376--- fedmsg_meta_fedora_infrastructure/tests/coprs.py 2014-07-14 22:20:38 +0000
377+++ fedmsg_meta_fedora_infrastructure/tests/coprs.py 2015-04-03 19:43:46 +0000
378@@ -68,7 +68,8 @@
379 when a build has completed.
380 """
381 expected_title = "copr.build.end"
382- expected_subti = ("fatka's mutt-kz copr build finished with 'success'")
383+ expected_subti = (
384+ "fatka's mutt-kz copr build finished fedora-20-x86_64 with 'success'")
385 expected_secondary_icon = (
386 'https://seccdn.libravatar.org/avatar/'
387 'b9d974c03597da48d9c3b11d4423bf30c6e0c01c23bcd3a192167a95f7c506bc?'
388@@ -88,6 +89,7 @@
389 u'topic': u'org.fedoraproject.prod.copr.build.end',
390 u'msg': {
391 u'status': 1,
392+ u'chroot': u'fedora-20-x86_64',
393 u'what': u'build end: user:fatka copr:mutt-kz build:100 '
394 'ip:172.16.3.3 pid:12010 status:1',
395 u'ip': u'172.16.3.3',
396
397=== modified file 'fedmsg_meta_fedora_infrastructure/tests/fedimg.py'
398--- fedmsg_meta_fedora_infrastructure/tests/fedimg.py 2014-07-14 22:20:38 +0000
399+++ fedmsg_meta_fedora_infrastructure/tests/fedimg.py 2015-04-03 19:43:46 +0000
400@@ -56,6 +56,37 @@
401 u'timestamp': 1371498303.125771,
402 }
403
404+
405+class TestImageTest(Base):
406+ """ These messages are awarded when an image starts has started,
407+ completes, or fails. """
408+
409+ expected_title = "fedimg.image.test"
410+ image_name = "fedora-cloud-base-rawhide-20140604.x86_64"
411+ dest = "EC2-eu-west-1"
412+ expected_subti = "Image {0} started testing on {1}".format(image_name,
413+ dest)
414+ expected_link = None
415+ expected_icon = None
416+ expected_secondary_icon = None
417+ expected_packages = set([])
418+ expected_usernames = set([])
419+ expected_objects = set([])
420+ msg = {
421+ u'i': 1,
422+ u'msg': {
423+ u'image_url': 'https://kojipkgs.fedoraproject.org//work/'
424+ 'tasks/5144/6925144/fedora-cloud-base-'
425+ 'rawhide-20140604.x86_64.raw.xz',
426+ u'image_name': 'fedora-cloud-base-rawhide-20140604.x86_64',
427+ u'destination': 'EC2-eu-west-1',
428+ u'status': 'started',
429+ },
430+ u'topic': u'org.fedoraproject.stg.fedimg.image.test',
431+ u'username': u'fedimg',
432+ u'timestamp': 1371498303.125771,
433+ }
434+
435 add_doc(locals())
436
437 if __name__ == '__main__':
438
439=== added file 'fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py'
440--- fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py 1970-01-01 00:00:00 +0000
441+++ fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py 2015-04-03 19:43:46 +0000
442@@ -0,0 +1,167 @@
443+# This file is part of fedmsg.
444+# Copyright (C) 2014 Red Hat, Inc.
445+#
446+# fedmsg is free software; you can redistribute it and/or
447+# modify it under the terms of the GNU Lesser General Public
448+# License as published by the Free Software Foundation; either
449+# version 2.1 of the License, or (at your option) any later version.
450+#
451+# fedmsg is distributed in the hope that it will be useful,
452+# but WITHOUT ANY WARRANTY; without even the implied warranty of
453+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
454+# Lesser General Public License for more details.
455+#
456+# You should have received a copy of the GNU Lesser General Public
457+# License along with fedmsg; if not, write to the Free Software
458+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
459+#
460+#
461+#
462+# Authors: Hammad Haleem <hammadhaleem@gmail.com>
463+
464+""" Tests for Fedora College Message """
465+
466+import unittest
467+import datetime
468+
469+from fedmsg.tests.test_meta import Base
470+
471+from common import add_doc
472+
473+
474+class TestMediaUploadBase():
475+
476+ """ These messages are for people when
477+ they upload stuff to fedora College portal`_.
478+ """
479+
480+ expected_title = "fedoracollege.media.upload"
481+ expected_subtitle = 'pingou uploaded a new file of type "image"'
482+ expected_link = "http://testlink"
483+ expected_icon = (None)
484+ expected_secondary_icon = (
485+ "https://seccdn.libravatar.org/avatar/"
486+ "01fe73d687f4db328da1183f2a1b5b22962ca9d9c50f0728aafeac974856311c"
487+ "?s=64&d=retro")
488+ expected_packages = set([])
489+ expected_usernames = set(['pingou'])
490+ msg = {
491+ "username": "pingou",
492+ "i": 1,
493+ "timestamp": 1379638157.759283,
494+ "msg_id": "2013-96f9ca0e-c7c6-43f0-9de7-7a268c7f1cef",
495+ "topic": "fedoracollege.media.upload",
496+ "link": "https://FedoraCollege.org/testlink",
497+ "msg":
498+ {
499+ "title": "image",
500+ "link": "https://testlink",
501+ "content_url": "http://demo.engineerinme.com/static/uploads/\
502+ hammadhaleem/1404190396.4603c7aec5\
503+ a7f21a64a4489fc68d762168.png",
504+ "file_type": "image",
505+ "filename": "1404190396.4603c7aec5a7f\
506+ 21a64a4489fc68d762168.png",
507+ "id": "1",
508+ "name": "File upload",
509+ "sys_path ": "/home/engineer/fedora-college/fedora_college/static/\
510+ uploads/hammadhaleem/34343423.png",
511+ "tags": "fedora-college image-upload website ",
512+ "thumb": "static/uploads/hammadhaleem/1404190396.4603c7aec5a7f21a64a4489f\
513+ c68d762168.png_thumb.jpg",
514+ "timestamp": "2014-07-01 04:53:16.599954",
515+ "username": "pingou"
516+ }
517+ }
518+
519+
520+class TestContentEdit(Base):
521+
522+ """ These messages are published when
523+ someone edit content in the fedora College.
524+ """
525+ expected_title = "fedoracollege.content.edit"
526+ expected_subtitle = 'pingou Edited content titled "test"'
527+ expected_link = "http://testlink"
528+ expected_icon = (None)
529+ expected_secondary_icon = (
530+ "https://seccdn.libravatar.org/avatar/"
531+ "01fe73d687f4db328da1183f2a1b5b22962ca9d9c50f0728aafeac974856311c"
532+ "?s=64&d=retro")
533+ expected_packages = set([])
534+ expected_usernames = set(['pingou'])
535+ msg = {
536+ "username": "pingou",
537+ "i": 1,
538+ "timestamp": 1379638157.759283,
539+ "msg_id": "2013-96f9ca0e-c7c6-43f0-9de7-7a268c7f1cef",
540+ "topic": "fedoracollege.content.edit",
541+ "link": "https://FedoraCollege.org/testlink",
542+ "msg":
543+ {
544+ "title": "test",
545+ "link": "https://testlink",
546+ "active": True,
547+ "date_added": "Tue, 01 Jul 2014 19:07:00 GMT",
548+ "description": "The Content available on this\
549+ website is contributed from people in fedora\
550+ community. Mostly all\
551+ the content has CC licence.</p>",
552+ "id": 2,
553+ "media_added_ids": "",
554+ "slug": "about-the-content",
555+ "tags": "fedora-college, blog",
556+ "title": "About the content",
557+ "type": "blog",
558+ "username": "pingou"
559+ }
560+ }
561+
562+
563+class TestContentAdded(Base):
564+
565+ """ These messages are published when
566+ someone edit content in the fedora College.
567+ """
568+
569+ expected_title = "fedoracollege.content.edit"
570+ expected_subtitle = 'pingou Created new content titled "test"'
571+ expected_link = "http://testlink"
572+ expected_icon = (None)
573+ expected_secondary_icon = (
574+ "https://seccdn.libravatar.org/avatar/"
575+ "01fe73d687f4db328da1183f2a1b5b22962ca9d9c50f0728aafeac974856311c"
576+ "?s=64&d=retro")
577+ expected_packages = set([])
578+ expected_usernames = set(['pingou'])
579+ msg = {
580+ "username": "pingou",
581+ "i": 1,
582+ "timestamp": 1379638157.759283,
583+ "msg_id": "2013-96f9ca0e-c7c6-43f0-9de7-7a268c7f1cef",
584+ "topic": "fedoracollege.content.added",
585+ "link": "https://FedoraCollege.org/testlink",
586+ "msg": {
587+ "title": "test",
588+ "link": "https://testlink",
589+ "active": True,
590+ "date_added": "Tue, 01 Jul 2014 19:07:00 GMT",
591+ "description": "The Content available on this\
592+ website is contributed from people in fedora\
593+ community. Mostly all\
594+ the content has CC licence.</p>",
595+ "id": 2,
596+ "media_added_ids": "",
597+ "slug": "about-the-content",
598+ "tags": "fedora-college, blog",
599+ "title": "About the content",
600+ "type": "blog",
601+ "username": "pingou"
602+ }
603+ }
604+
605+
606+add_doc(locals())
607+
608+if __name__ == '__main__':
609+ unittest.main()
610
611=== modified file 'fedmsg_meta_fedora_infrastructure/tests/github.py'
612--- fedmsg_meta_fedora_infrastructure/tests/github.py 2014-07-14 22:20:38 +0000
613+++ fedmsg_meta_fedora_infrastructure/tests/github.py 2015-04-03 19:43:46 +0000
614@@ -1483,6 +1483,88 @@
615 }
616
617
618+class TestGithubWatch(Base):
619+ """ There exists `a service
620+ <https://apps.fedoraproject.org/github2fedmsg>`_ to link the select github
621+ repos of fedora contributors with the fedmsg bus.
622+
623+ Messages of *this* type are published whenever someone **watches a
624+ repository**.
625+ """
626+
627+ expected_title = "github.watch"
628+ expected_subti = "alikins started watching fedora-infra/summershum"
629+ expected_link = "https://github.com/fedora-infra/summershum/watchers"
630+ expected_icon = "https://apps.fedoraproject.org/img/icons/github.png"
631+ expected_secondary_icon = (
632+ "https://seccdn.libravatar.org/avatar/"
633+ "d23ffcf6c375ae6351f54b6d4e381c6910e68d666370e5ff21e4322cd56690bf"
634+ "?s=64&d=retro")
635+ expected_packages = set([])
636+ expected_usernames = set([])
637+ expected_objects = set([
638+ 'fedora-infra/summershum/watchers',
639+ ])
640+ msg = {
641+ "source_name": "datanommer",
642+ "i": 1,
643+ "timestamp": 1403363334.0,
644+ "msg_id": "2014-5273bf43-d483-48d4-a8d6-11c988cae0cb",
645+ "topic": "org.fedoraproject.prod.github.watch",
646+ "source_version": "0.6.4",
647+ "msg": {
648+ "action": "started",
649+ "fas_usernames": {},
650+ "repository": {
651+ "has_wiki": False,
652+ "forks_count": 7,
653+ "updated_at": "2014-06-21T15:08:53Z",
654+ "private": False,
655+ "full_name": "fedora-infra/summershum",
656+ "owner": {
657+ "url": "https://api.github.com/users/fedora-infra",
658+ "site_admin": False,
659+ "html_url": "https://github.com/fedora-infra",
660+ "gravatar_id": "ebdef1eaaa4b1c1cb01f5570efbb3cc4",
661+ "login": "fedora-infra",
662+ "type": "Organization",
663+ "id": 3316637
664+ },
665+ "id": 16620564,
666+ "size": 907,
667+ "watchers_count": 10,
668+ "forks": 7,
669+ "homepage": "",
670+ "fork": False,
671+ "description": "fedmsg consumer that extracts hashes of "
672+ "source files",
673+ "has_downloads": True,
674+ "default_branch": "develop",
675+ "html_url": "https://github.com/fedora-infra/summershum",
676+ "has_issues": True,
677+ "stargazers_count": 10,
678+ "open_issues_count": 2,
679+ "watchers": 10,
680+ "name": "summershum",
681+ "language": "Python",
682+ "url": "https://api.github.com/repos/fedora-infra/summershum",
683+ "created_at": "2014-02-07T16:35:59Z",
684+ "pushed_at": "2014-06-13T12:11:18Z",
685+ "open_issues": 2
686+ },
687+ "sender": {
688+ "url": "https://api.github.com/users/alikins",
689+ "site_admin": False,
690+ "html_url": "https://github.com/alikins",
691+ "gravatar_id": "81877b32b5fac41db3207c94ecc26173",
692+ "login": "alikins",
693+ "type": "User",
694+ "id": 15162
695+ }
696+ }
697+ }
698+
699+
700 add_doc(locals())
701
702 if __name__ == '__main__':
703
704=== modified file 'fedmsg_meta_fedora_infrastructure/tests/jenkins.py'
705--- fedmsg_meta_fedora_infrastructure/tests/jenkins.py 2014-05-18 18:33:16 +0000
706+++ fedmsg_meta_fedora_infrastructure/tests/jenkins.py 2015-04-03 19:43:46 +0000
707@@ -105,6 +105,84 @@
708 },
709 }
710
711+class TestJenkinsBuildAborted(Base):
712+ """ `Jenkins <http://jenkins.cloud.fedoraproject.org/>`_ publishes these
713+ messages when a build is aborted.
714+ """
715+ expected_title = "jenkins.build.aborted"
716+ expected_subti = ("Jenkins project 'fedora-mobile' build aborted")
717+ expected_secondary_icon = ''
718+ expected_packages = set([])
719+ expected_usernames = set([])
720+ expected_objects = set([
721+ 'jenkins/fedora-mobile/build.aborted',
722+ ])
723+ expected_link = (
724+ "http://jenkins.cloud.fedoraproject.org/job/fedora-mobile/165/")
725+ msg = {
726+ u'i': 1,
727+ u'timestamp': 1390982532.0,
728+ u'msg_id': u'2014-851eb465-56f2-4f3f-bf8a-2b86c95d1246',
729+ u'topic': u'org.fedoraproject.prod.jenkins.build.aborted',
730+ u'msg': {
731+ u'project': 'fedora-mobile',
732+ u'took': u'9.4 sec',
733+ u'build': 165,
734+ },
735+ }
736+
737+class TestJenkinsBuildNotBuilt(Base):
738+ """ `Jenkins <http://jenkins.cloud.fedoraproject.org/>`_ publishes these
739+ messages when a build doesn't actually build (wat?).
740+ """
741+ expected_title = "jenkins.build.notbuilt"
742+ expected_subti = ("Jenkins project 'fedora-mobile' did not build")
743+ expected_secondary_icon = ''
744+ expected_packages = set([])
745+ expected_usernames = set([])
746+ expected_objects = set([
747+ 'jenkins/fedora-mobile/build.notbuilt',
748+ ])
749+ expected_link = (
750+ "http://jenkins.cloud.fedoraproject.org/job/fedora-mobile/165/")
751+ msg = {
752+ u'i': 1,
753+ u'timestamp': 1390982532.0,
754+ u'msg_id': u'2014-851eb465-56f2-4f3f-bf8a-2b86c95d1246',
755+ u'topic': u'org.fedoraproject.prod.jenkins.build.notbuilt',
756+ u'msg': {
757+ u'project': 'fedora-mobile',
758+ u'took': u'9.4 sec',
759+ u'build': 165,
760+ },
761+ }
762+
763+class TestJenkinsBuildUnstable(Base):
764+ """ `Jenkins <http://jenkins.cloud.fedoraproject.org/>`_ publishes these
765+ messages when a build completes with warnings.
766+ """
767+ expected_title = "jenkins.build.unstable"
768+ expected_subti = ("Jenkins project 'fedora-mobile' built with warnings")
769+ expected_secondary_icon = ''
770+ expected_packages = set([])
771+ expected_usernames = set([])
772+ expected_objects = set([
773+ 'jenkins/fedora-mobile/build.unstable',
774+ ])
775+ expected_link = (
776+ "http://jenkins.cloud.fedoraproject.org/job/fedora-mobile/165/")
777+ msg = {
778+ u'i': 1,
779+ u'timestamp': 1390982532.0,
780+ u'msg_id': u'2014-851eb465-56f2-4f3f-bf8a-2b86c95d1246',
781+ u'topic': u'org.fedoraproject.prod.jenkins.build.unstable',
782+ u'msg': {
783+ u'project': 'fedora-mobile',
784+ u'took': u'9.4 sec',
785+ u'build': 165,
786+ },
787+ }
788+
789
790 add_doc(locals())
791
792
793=== modified file 'fedmsg_meta_fedora_infrastructure/tests/pkgdb.py'
794--- fedmsg_meta_fedora_infrastructure/tests/pkgdb.py 2014-07-14 22:20:38 +0000
795+++ fedmsg_meta_fedora_infrastructure/tests/pkgdb.py 2015-04-03 19:43:46 +0000
796@@ -250,9 +250,9 @@
797 }
798
799
800-class TestPkgdbPackageUpdate(Base):
801+class TestPkgdbPackageUpdateStatus(Base):
802 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
803- publishes this message when metadata for a package is updated.
804+ publishes this message when the status of a package is updated.
805 """
806 expected_title = "pkgdb.package.update.status"
807 expected_subti = "ralph unretired guake in F-18"
808@@ -297,6 +297,42 @@
809 }
810 }
811
812+class TestPkgdbPackageUpdate(Base):
813+ """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
814+ publishes this message when metadata for a package is updated.
815+ """
816+ expected_title = "pkgdb.package.update"
817+ expected_subti = "pkgdb_updater updated: summary, description of guake"
818+ expected_link = "https://admin.fedoraproject.org/pkgdb/package/guake/"
819+ expected_icon = ("https://apps.fedoraproject.org/packages/images/icons/"
820+ "package_128x128.png")
821+ expected_secondary_icon = (
822+ "https://seccdn.libravatar.org/avatar/"
823+ "1ff483b03adb34142ac55a5efecfa71b0149d57566f86d969905005b0ab98def"
824+ "?s=64&d=retro")
825+ expected_packages = set(['guake'])
826+ expected_usernames = set(['pkgdb_updater'])
827+ expected_objects = set(['guake/update'])
828+ msg = {
829+ "username": "apache",
830+ "i": 144,
831+ "timestamp": 1379605523.496933,
832+ "msg_id": "2013-c131fb95-0a2e-4426-95c3-09766e017d29",
833+ "topic": "org.fedoraproject.dev.pkgdb.package.update",
834+ "msg": {
835+ "package": {
836+ "status": "Approved",
837+ "upstream_url": "http://guake.org",
838+ "name": "guake",
839+ "creation_date": 1379619917.0,
840+ "summary": "Top down terminal for GNOME",
841+ "review_url": "https://bugzilla.redhat.com/450189"
842+ },
843+ "agent": "pkgdb_updater",
844+ "fields": ["summary", "description"],
845+ }
846+ }
847+
848
849 class TestPkgdbBranchClone(Base):
850 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
851@@ -359,7 +395,7 @@
852 }
853
854
855-class TestPkgdbPackageRetire(Base):
856+class TestLegacyPkgdbPackageRetire(Base):
857 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
858 publishes messages on this topic when a package is retired. For example:
859 """
860
861=== modified file 'setup.py'
862--- setup.py 2014-07-14 22:20:38 +0000
863+++ setup.py 2015-04-03 19:43:46 +0000
864@@ -101,7 +101,7 @@
865
866 setup(
867 name='fedmsg_meta_fedora_infrastructure',
868- version='0.2.15',
869+ version='0.2.18',
870 description=
871 "fedmsg metadata providers for Fedora Infrastructure's deployment",
872 long_description=long_description,

Subscribers

People subscribed via source and target branches

to all changes: