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
=== modified file 'PKG-INFO'
--- PKG-INFO 2014-07-14 22:20:38 +0000
+++ PKG-INFO 2015-04-03 19:43:46 +0000
@@ -1,6 +1,6 @@
1Metadata-Version: 1.01Metadata-Version: 1.0
2Name: fedmsg_meta_fedora_infrastructure2Name: fedmsg_meta_fedora_infrastructure
3Version: 0.2.153Version: 0.2.18
4Summary: fedmsg metadata providers for Fedora Infrastructure's deployment4Summary: fedmsg metadata providers for Fedora Infrastructure's deployment
5Home-page: https://github.com/ralphbean/fedmsg_meta_fedora_infrastructure/5Home-page: https://github.com/ralphbean/fedmsg_meta_fedora_infrastructure/
6Author: Ralph Bean6Author: Ralph Bean
77
=== modified file 'debian/changelog'
--- debian/changelog 2014-07-14 22:20:38 +0000
+++ debian/changelog 2015-04-03 19:43:46 +0000
@@ -1,3 +1,15 @@
1fedmsg-meta-fedora-infrastructure (0.2.18-1ubuntu1) vivid; urgency=medium
2
3 * Disable tests because they need an internet connection
4
5 -- Jackson Doak <noskcaj@ubuntu.com> Sat, 28 Feb 2015 06:38:22 +1100
6
7fedmsg-meta-fedora-infrastructure (0.2.18-1) unstable; urgency=medium
8
9 * New upstream release
10
11 -- Nicolas Dandrimont <olasd@debian.org> Sat, 16 Aug 2014 00:57:05 +0200
12
1fedmsg-meta-fedora-infrastructure (0.2.15-1) unstable; urgency=medium13fedmsg-meta-fedora-infrastructure (0.2.15-1) unstable; urgency=medium
214
3 * New upstream release15 * New upstream release
416
=== modified file 'debian/control'
--- debian/control 2014-05-18 18:33:16 +0000
+++ debian/control 2015-04-03 19:43:46 +0000
@@ -1,7 +1,8 @@
1Source: fedmsg-meta-fedora-infrastructure1Source: fedmsg-meta-fedora-infrastructure
2Section: python2Section: python
3Priority: optional3Priority: optional
4Maintainer: Nicolas Dandrimont <olasd@debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Nicolas Dandrimont <olasd@debian.org>
5Build-Depends: debhelper (>= 9),6Build-Depends: debhelper (>= 9),
6 dh-python,7 dh-python,
7 python-all,8 python-all,
89
=== modified file 'debian/rules'
--- debian/rules 2014-05-18 18:33:16 +0000
+++ debian/rules 2015-04-03 19:43:46 +0000
@@ -1,3 +1,7 @@
1#!/usr/bin/make -f1#!/usr/bin/make -f
2
2%:3%:
3 dh $@ --with python2 --buildsystem=pybuild4 dh $@ --with python2 --buildsystem=pybuild
5
6# Disable tests because they need an internet connection
7dh_auto_test:
48
=== modified file 'fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO'
--- fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure.egg-info/PKG-INFO 2015-04-03 19:43:46 +0000
@@ -1,6 +1,6 @@
1Metadata-Version: 1.01Metadata-Version: 1.0
2Name: fedmsg-meta-fedora-infrastructure2Name: fedmsg-meta-fedora-infrastructure
3Version: 0.2.153Version: 0.2.18
4Summary: fedmsg metadata providers for Fedora Infrastructure's deployment4Summary: fedmsg metadata providers for Fedora Infrastructure's deployment
5Home-page: https://github.com/ralphbean/fedmsg_meta_fedora_infrastructure/5Home-page: https://github.com/ralphbean/fedmsg_meta_fedora_infrastructure/
6Author: Ralph Bean6Author: Ralph Bean
77
=== modified file 'fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt'
--- fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure.egg-info/SOURCES.txt 2015-04-03 19:43:46 +0000
@@ -23,6 +23,7 @@
23fedmsg_meta_fedora_infrastructure/fasshim.py23fedmsg_meta_fedora_infrastructure/fasshim.py
24fedmsg_meta_fedora_infrastructure/fedimg.py24fedmsg_meta_fedora_infrastructure/fedimg.py
25fedmsg_meta_fedora_infrastructure/fedocal.py25fedmsg_meta_fedora_infrastructure/fedocal.py
26fedmsg_meta_fedora_infrastructure/fedoracollege.py
26fedmsg_meta_fedora_infrastructure/fmn.py27fedmsg_meta_fedora_infrastructure/fmn.py
27fedmsg_meta_fedora_infrastructure/github.py28fedmsg_meta_fedora_infrastructure/github.py
28fedmsg_meta_fedora_infrastructure/jenkins.py29fedmsg_meta_fedora_infrastructure/jenkins.py
@@ -59,6 +60,7 @@
59fedmsg_meta_fedora_infrastructure/tests/elections.py60fedmsg_meta_fedora_infrastructure/tests/elections.py
60fedmsg_meta_fedora_infrastructure/tests/fedimg.py61fedmsg_meta_fedora_infrastructure/tests/fedimg.py
61fedmsg_meta_fedora_infrastructure/tests/fedocal.py62fedmsg_meta_fedora_infrastructure/tests/fedocal.py
63fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py
62fedmsg_meta_fedora_infrastructure/tests/fmn.py64fedmsg_meta_fedora_infrastructure/tests/fmn.py
63fedmsg_meta_fedora_infrastructure/tests/ftpsync.py65fedmsg_meta_fedora_infrastructure/tests/ftpsync.py
64fedmsg_meta_fedora_infrastructure/tests/github.py66fedmsg_meta_fedora_infrastructure/tests/github.py
6567
=== modified file 'fedmsg_meta_fedora_infrastructure/coprs.py'
--- fedmsg_meta_fedora_infrastructure/coprs.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/coprs.py 2015-04-03 19:43:46 +0000
@@ -48,7 +48,7 @@
48 tmpl = self._("{user} started a new build of the {copr} copr")48 tmpl = self._("{user} started a new build of the {copr} copr")
49 elif 'copr.build.end' in msg['topic']:49 elif 'copr.build.end' in msg['topic']:
50 tmpl = self._(50 tmpl = self._(
51 "{user}'s {copr} copr build finished with '{status}'")51 "{user}'s {copr} copr build finished {chroot} with '{status}'")
52 elif 'copr.chroot.start' in msg['topic']:52 elif 'copr.chroot.start' in msg['topic']:
53 tmpl = self._("{user}'s {copr} copr started a new {chroot} chroot")53 tmpl = self._("{user}'s {copr} copr started a new {chroot} chroot")
54 elif 'copr.worker.create' in msg['topic']:54 elif 'copr.worker.create' in msg['topic']:
5555
=== modified file 'fedmsg_meta_fedora_infrastructure/fedimg.py'
--- fedmsg_meta_fedora_infrastructure/fedimg.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/fedimg.py 2015-04-03 19:43:46 +0000
@@ -30,18 +30,35 @@
30 __obj__ = "New cloud image upload"30 __obj__ = "New cloud image upload"
3131
32 def subtitle(self, msg, **config):32 def subtitle(self, msg, **config):
33 if msg['msg']['status'] is "started":33 if 'image.upload' in msg['topic']:
34 name = msg['msg']['image_name']34 if msg['msg']['status'] is "started":
35 dest = msg['msg']['destination']35 name = msg['msg']['image_name']
36 tmpl = self._('Image {image_name} started uploading to {dest}')36 dest = msg['msg']['destination']
37 return tmpl.format(image_name=name, dest=dest)37 tmpl = self._('Image {image_name} started uploading to {dest}')
38 elif msg['msg']['status'] is "completed":38 return tmpl.format(image_name=name, dest=dest)
39 name = msg['msg']['image_name']39 elif msg['msg']['status'] is "completed":
40 dest = msg['msg']['destination']40 name = msg['msg']['image_name']
41 tmpl = self._('Image {image_name} finished uploading to to {dest}')41 dest = msg['msg']['destination']
42 return tmpl.format(image_name=name, dest=dest)42 tmpl = self._('Image {image_name} finished uploading to to {dest}')
43 elif msg['msg']['status'] is "failed":43 return tmpl.format(image_name=name, dest=dest)
44 name = msg['msg']['image_name']44 elif msg['msg']['status'] is "failed":
45 dest = msg['msg']['destination']45 name = msg['msg']['image_name']
46 tmpl = self._('Image {image_name} failed to upload to {dest}')46 dest = msg['msg']['destination']
47 return tmpl.format(image_name=name, dest=dest)47 tmpl = self._('Image {image_name} failed to upload to {dest}')
48 return tmpl.format(image_name=name, dest=dest)
49 if 'image.test' in msg['topic']:
50 if msg['msg']['status'] is "started":
51 name = msg['msg']['image_name']
52 dest = msg['msg']['destination']
53 tmpl = self._('Image {image_name} started testing on {dest}')
54 return tmpl.format(image_name=name, dest=dest)
55 elif msg['msg']['status'] is "completed":
56 name = msg['msg']['image_name']
57 dest = msg['msg']['destination']
58 tmpl = self._('Image {image_name} finished testing on {dest}')
59 return tmpl.format(image_name=name, dest=dest)
60 elif msg['msg']['status'] is "failed":
61 name = msg['msg']['image_name']
62 dest = msg['msg']['destination']
63 tmpl = self._('Image {image_name} failed testing on {dest}')
64 return tmpl.format(image_name=name, dest=dest)
4865
=== added file 'fedmsg_meta_fedora_infrastructure/fedoracollege.py'
--- fedmsg_meta_fedora_infrastructure/fedoracollege.py 1970-01-01 00:00:00 +0000
+++ fedmsg_meta_fedora_infrastructure/fedoracollege.py 2015-04-03 19:43:46 +0000
@@ -0,0 +1,77 @@
1# This file is part of fedmsg.
2# Copyright (C) 2014 Red Hat, Inc.
3#
4# fedmsg is free software; you can redistribute it and/or
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
8#
9# fedmsg is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public
15# License along with fedmsg; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17#
18#
19# Authors: Hammad Haleem <hammadhaleem@gmail.com>
20'''Preprocessor for fedora college'''
21
22from fedmsg_meta_fedora_infrastructure import BaseProcessor
23from .fasshim import gravatar_url
24
25
26class FedoraCollegeProcessor(BaseProcessor):
27 __name__ = "FedoraCollege"
28 __description__ = "The virtual Classroom for new fedora contributors"
29 __obj__ = "Delivering video tutorials"
30
31 '''
32 currently not in production
33 __link__ = "https://ask.fedoraproject.org"
34 __docs__ = "https://askbot.com"
35 __icon__ = "https://apps.fedoraproject.org/img/icons/ask_fedora.png"
36 '''
37
38 def subtitle(self, msg, **config):
39
40 username = msg['msg']['username']
41 title = msg['msg']['title']
42
43 if "fedoracollege.media.upload" in msg['topic']:
44 tmpl = self._(
45 '{username} uploaded a new file of type "{title}"')
46 elif "fedoracollege.content.added" in msg['topic']:
47 tmpl = self._(
48 '{username} Created new content titled "{title}"')
49 elif "fedoracollege.content.edit" in msg['topic']:
50 tmpl = self._(
51 '{username} Edited content titled "{title}"')
52 else:
53 raise NotImplementedError("%r" % msg)
54
55 return tmpl.format(username=username, title=title)
56
57 def secondary_icon(self, msg, **config):
58 user = None
59
60 try:
61 user = msg['msg']['username']
62 except KeyError:
63 pass
64
65 if not user:
66 return ""
67
68 return gravatar_url(username=user)
69
70 def usernames(self, msg, **config):
71 if 'username' in msg['msg']:
72 return set([msg['msg']['username']])
73
74 return set()
75
76 def link(self, msg, **config):
77 return msg['msg']['link']
078
=== modified file 'fedmsg_meta_fedora_infrastructure/github.py'
--- fedmsg_meta_fedora_infrastructure/github.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/github.py 2015-04-03 19:43:46 +0000
@@ -31,7 +31,9 @@
3131
32 def _get_user(self, msg):32 def _get_user(self, msg):
33 if msg['msg'].get('commit', None):33 if msg['msg'].get('commit', None):
34 user = msg['msg']['commit'].get('author', {}).get('login', {})34 user = msg['msg']['commit'].get('author')
35 if user:
36 user = user.get('login')
35 if user:37 if user:
36 return msg['msg']['fas_usernames'].get(user, user)38 return msg['msg']['fas_usernames'].get(user, user)
37 if msg['msg'].get('pusher', None):39 if msg['msg'].get('pusher', None):
@@ -57,6 +59,8 @@
57 return None59 return None
5860
59 def link(self, msg, **config):61 def link(self, msg, **config):
62 if 'github.watch' in msg['topic']:
63 return msg['msg']['repository']['html_url'] + "/watchers"
60 if 'target_url' in msg['msg']:64 if 'target_url' in msg['msg']:
61 return msg['msg']['target_url']65 return msg['msg']['target_url']
62 if 'compare' in msg['msg']:66 if 'compare' in msg['msg']:
@@ -124,6 +128,10 @@
124 sha = msg['msg']['sha'][:8]128 sha = msg['msg']['sha'][:8]
125 tmpl = self._("{description} for {repo} {sha}")129 tmpl = self._("{description} for {repo} {sha}")
126 return tmpl.format(description=description, repo=repo, sha=sha)130 return tmpl.format(description=description, repo=repo, sha=sha)
131 elif 'github.watch' in msg['topic']:
132 tmpl = self._('{user} {action} watching {repo}')
133 action = msg['msg']['action']
134 return tmpl.format(user=user, repo=repo, action=action)
127 else:135 else:
128 pass136 pass
129137
@@ -148,6 +156,7 @@
148 'github.commit_comment': 'tree',156 'github.commit_comment': 'tree',
149 'github.create': None,157 'github.create': None,
150 'github.delete': None,158 'github.delete': None,
159 'github.watch': None,
151 }160 }
152161
153 if suffix not in lookup:162 if suffix not in lookup:
@@ -180,5 +189,7 @@
180 items = [msg['msg']['commit']['sha']]189 items = [msg['msg']['commit']['sha']]
181 elif suffix == 'github.commit_comment':190 elif suffix == 'github.commit_comment':
182 items = [msg['msg']['comment']['path']]191 items = [msg['msg']['comment']['path']]
192 elif suffix == 'github.watch':
193 items = ['watchers']
183194
184 return set([base + '/' + item for item in items])195 return set([base + '/' + item for item in items])
185196
=== modified file 'fedmsg_meta_fedora_infrastructure/jenkins.py'
--- fedmsg_meta_fedora_infrastructure/jenkins.py 2014-05-18 18:33:16 +0000
+++ fedmsg_meta_fedora_infrastructure/jenkins.py 2015-04-03 19:43:46 +0000
@@ -37,6 +37,12 @@
37 tmpl = self._("Jenkins project '{project}' failed to build")37 tmpl = self._("Jenkins project '{project}' failed to build")
38 elif 'jenkins.build.passed' in msg['topic']:38 elif 'jenkins.build.passed' in msg['topic']:
39 tmpl = self._("Jenkins project '{project}' built successfully")39 tmpl = self._("Jenkins project '{project}' built successfully")
40 elif 'jenkins.build.unstable' in msg['topic']:
41 tmpl = self._("Jenkins project '{project}' built with warnings")
42 elif 'jenkins.build.notbuilt' in msg['topic']:
43 tmpl = self._("Jenkins project '{project}' did not build")
44 elif 'jenkins.build.aborted' in msg['topic']:
45 tmpl = self._("Jenkins project '{project}' build aborted")
40 elif 'jenkins.build.start' in msg['topic']:46 elif 'jenkins.build.start' in msg['topic']:
41 tmpl = self._("Jenkins project '{project}' started building")47 tmpl = self._("Jenkins project '{project}' started building")
42 else:48 else:
4349
=== modified file 'fedmsg_meta_fedora_infrastructure/pkgdb.py'
--- fedmsg_meta_fedora_infrastructure/pkgdb.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/pkgdb.py 2015-04-03 19:43:46 +0000
@@ -62,7 +62,7 @@
62 master = msg['msg']['master']62 master = msg['msg']['master']
63 return tmpl.format(agent=agent, package=package,63 return tmpl.format(agent=agent, package=package,
64 branch=branch, master=master)64 branch=branch, master=master)
65 elif 'pkgdb.package.update' in msg['topic']:65 elif 'pkgdb.package.update.status' in msg['topic']:
66 tmpl = self._(u"{agent} {verb} {package}{extra}")66 tmpl = self._(u"{agent} {verb} {package}{extra}")
67 extra = ""67 extra = ""
6868
@@ -90,6 +90,25 @@
9090
91 return tmpl.format(agent=agent, package=package, verb=verb,91 return tmpl.format(agent=agent, package=package, verb=verb,
92 extra=extra)92 extra=extra)
93 elif msg['topic'].endswith('pkgdb.package.update'):
94 agent = get_agent(msg)
95
96 try:
97 package = msg['msg']['package_listing']['package']['name']
98 except KeyError:
99 package = msg['msg']['package']
100 if isinstance(package, dict):
101 package = package['name']
102
103 if 'fields' in msg['msg']:
104 # New pkgdb2 style
105 tmpl = self._(u"{agent} updated: {fields} of {package}")
106 fields = ', '.join(msg['msg'].get('fields'))
107 return tmpl.format(agent=agent, package=package, fields=fields)
108 else:
109 # old old pkgdb1 style
110 tmpl = self._(u"{agent} made some updates to {package}")
111 return tmpl.format(agent=agent, package=package)
93 elif 'pkgdb.critpath.update' in msg['topic']:112 elif 'pkgdb.critpath.update' in msg['topic']:
94 tmpl = self._(113 tmpl = self._(
95 u"{agent} altered the critpath status for some packages")114 u"{agent} altered the critpath status for some packages")
@@ -296,6 +315,8 @@
296 package = _msg['package_listing']['package']['name']315 package = _msg['package_listing']['package']['name']
297 except KeyError:316 except KeyError:
298 package = _msg['package']317 package = _msg['package']
318 if isinstance(package, dict):
319 package = package['name']
299 objs.add('{package}/update'.format(package=package))320 objs.add('{package}/update'.format(package=package))
300 elif 'pkgdb.branch.clone' in msg['topic']:321 elif 'pkgdb.branch.clone' in msg['topic']:
301 objs.add('{package}/branch'.format(package=_msg['package']))322 objs.add('{package}/branch'.format(package=_msg['package']))
@@ -319,6 +340,8 @@
319 try:340 try:
320 if isinstance(msg['msg']['package'], basestring):341 if isinstance(msg['msg']['package'], basestring):
321 packages.add(msg['msg']['package'])342 packages.add(msg['msg']['package'])
343 else:
344 packages.add(msg['msg']['package']['name'])
322 except KeyError:345 except KeyError:
323 pass346 pass
324347
@@ -353,6 +376,8 @@
353 package = msg['msg']['package_listing']['package']['name']376 package = msg['msg']['package_listing']['package']['name']
354 except KeyError:377 except KeyError:
355 package = msg['msg']['package']378 package = msg['msg']['package']
379 if isinstance(package, dict):
380 package = package['name']
356 return tmpl.format(package=package)381 return tmpl.format(package=package)
357382
358 return ""383 return ""
359384
=== modified file 'fedmsg_meta_fedora_infrastructure/tests/coprs.py'
--- fedmsg_meta_fedora_infrastructure/tests/coprs.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/tests/coprs.py 2015-04-03 19:43:46 +0000
@@ -68,7 +68,8 @@
68 when a build has completed.68 when a build has completed.
69 """69 """
70 expected_title = "copr.build.end"70 expected_title = "copr.build.end"
71 expected_subti = ("fatka's mutt-kz copr build finished with 'success'")71 expected_subti = (
72 "fatka's mutt-kz copr build finished fedora-20-x86_64 with 'success'")
72 expected_secondary_icon = (73 expected_secondary_icon = (
73 'https://seccdn.libravatar.org/avatar/'74 'https://seccdn.libravatar.org/avatar/'
74 'b9d974c03597da48d9c3b11d4423bf30c6e0c01c23bcd3a192167a95f7c506bc?'75 'b9d974c03597da48d9c3b11d4423bf30c6e0c01c23bcd3a192167a95f7c506bc?'
@@ -88,6 +89,7 @@
88 u'topic': u'org.fedoraproject.prod.copr.build.end',89 u'topic': u'org.fedoraproject.prod.copr.build.end',
89 u'msg': {90 u'msg': {
90 u'status': 1,91 u'status': 1,
92 u'chroot': u'fedora-20-x86_64',
91 u'what': u'build end: user:fatka copr:mutt-kz build:100 '93 u'what': u'build end: user:fatka copr:mutt-kz build:100 '
92 'ip:172.16.3.3 pid:12010 status:1',94 'ip:172.16.3.3 pid:12010 status:1',
93 u'ip': u'172.16.3.3',95 u'ip': u'172.16.3.3',
9496
=== modified file 'fedmsg_meta_fedora_infrastructure/tests/fedimg.py'
--- fedmsg_meta_fedora_infrastructure/tests/fedimg.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/tests/fedimg.py 2015-04-03 19:43:46 +0000
@@ -56,6 +56,37 @@
56 u'timestamp': 1371498303.125771,56 u'timestamp': 1371498303.125771,
57 }57 }
5858
59
60class TestImageTest(Base):
61 """ These messages are awarded when an image starts has started,
62 completes, or fails. """
63
64 expected_title = "fedimg.image.test"
65 image_name = "fedora-cloud-base-rawhide-20140604.x86_64"
66 dest = "EC2-eu-west-1"
67 expected_subti = "Image {0} started testing on {1}".format(image_name,
68 dest)
69 expected_link = None
70 expected_icon = None
71 expected_secondary_icon = None
72 expected_packages = set([])
73 expected_usernames = set([])
74 expected_objects = set([])
75 msg = {
76 u'i': 1,
77 u'msg': {
78 u'image_url': 'https://kojipkgs.fedoraproject.org//work/'
79 'tasks/5144/6925144/fedora-cloud-base-'
80 'rawhide-20140604.x86_64.raw.xz',
81 u'image_name': 'fedora-cloud-base-rawhide-20140604.x86_64',
82 u'destination': 'EC2-eu-west-1',
83 u'status': 'started',
84 },
85 u'topic': u'org.fedoraproject.stg.fedimg.image.test',
86 u'username': u'fedimg',
87 u'timestamp': 1371498303.125771,
88 }
89
59add_doc(locals())90add_doc(locals())
6091
61if __name__ == '__main__':92if __name__ == '__main__':
6293
=== added file 'fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py'
--- fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py 1970-01-01 00:00:00 +0000
+++ fedmsg_meta_fedora_infrastructure/tests/fedoracollege.py 2015-04-03 19:43:46 +0000
@@ -0,0 +1,167 @@
1# This file is part of fedmsg.
2# Copyright (C) 2014 Red Hat, Inc.
3#
4# fedmsg is free software; you can redistribute it and/or
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
8#
9# fedmsg is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public
15# License along with fedmsg; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17#
18#
19#
20# Authors: Hammad Haleem <hammadhaleem@gmail.com>
21
22""" Tests for Fedora College Message """
23
24import unittest
25import datetime
26
27from fedmsg.tests.test_meta import Base
28
29from common import add_doc
30
31
32class TestMediaUploadBase():
33
34 """ These messages are for people when
35 they upload stuff to fedora College portal`_.
36 """
37
38 expected_title = "fedoracollege.media.upload"
39 expected_subtitle = 'pingou uploaded a new file of type "image"'
40 expected_link = "http://testlink"
41 expected_icon = (None)
42 expected_secondary_icon = (
43 "https://seccdn.libravatar.org/avatar/"
44 "01fe73d687f4db328da1183f2a1b5b22962ca9d9c50f0728aafeac974856311c"
45 "?s=64&d=retro")
46 expected_packages = set([])
47 expected_usernames = set(['pingou'])
48 msg = {
49 "username": "pingou",
50 "i": 1,
51 "timestamp": 1379638157.759283,
52 "msg_id": "2013-96f9ca0e-c7c6-43f0-9de7-7a268c7f1cef",
53 "topic": "fedoracollege.media.upload",
54 "link": "https://FedoraCollege.org/testlink",
55 "msg":
56 {
57 "title": "image",
58 "link": "https://testlink",
59 "content_url": "http://demo.engineerinme.com/static/uploads/\
60 hammadhaleem/1404190396.4603c7aec5\
61 a7f21a64a4489fc68d762168.png",
62 "file_type": "image",
63 "filename": "1404190396.4603c7aec5a7f\
64 21a64a4489fc68d762168.png",
65 "id": "1",
66 "name": "File upload",
67 "sys_path ": "/home/engineer/fedora-college/fedora_college/static/\
68 uploads/hammadhaleem/34343423.png",
69 "tags": "fedora-college image-upload website ",
70 "thumb": "static/uploads/hammadhaleem/1404190396.4603c7aec5a7f21a64a4489f\
71 c68d762168.png_thumb.jpg",
72 "timestamp": "2014-07-01 04:53:16.599954",
73 "username": "pingou"
74 }
75 }
76
77
78class TestContentEdit(Base):
79
80 """ These messages are published when
81 someone edit content in the fedora College.
82 """
83 expected_title = "fedoracollege.content.edit"
84 expected_subtitle = 'pingou Edited content titled "test"'
85 expected_link = "http://testlink"
86 expected_icon = (None)
87 expected_secondary_icon = (
88 "https://seccdn.libravatar.org/avatar/"
89 "01fe73d687f4db328da1183f2a1b5b22962ca9d9c50f0728aafeac974856311c"
90 "?s=64&d=retro")
91 expected_packages = set([])
92 expected_usernames = set(['pingou'])
93 msg = {
94 "username": "pingou",
95 "i": 1,
96 "timestamp": 1379638157.759283,
97 "msg_id": "2013-96f9ca0e-c7c6-43f0-9de7-7a268c7f1cef",
98 "topic": "fedoracollege.content.edit",
99 "link": "https://FedoraCollege.org/testlink",
100 "msg":
101 {
102 "title": "test",
103 "link": "https://testlink",
104 "active": True,
105 "date_added": "Tue, 01 Jul 2014 19:07:00 GMT",
106 "description": "The Content available on this\
107 website is contributed from people in fedora\
108 community. Mostly all\
109 the content has CC licence.</p>",
110 "id": 2,
111 "media_added_ids": "",
112 "slug": "about-the-content",
113 "tags": "fedora-college, blog",
114 "title": "About the content",
115 "type": "blog",
116 "username": "pingou"
117 }
118 }
119
120
121class TestContentAdded(Base):
122
123 """ These messages are published when
124 someone edit content in the fedora College.
125 """
126
127 expected_title = "fedoracollege.content.edit"
128 expected_subtitle = 'pingou Created new content titled "test"'
129 expected_link = "http://testlink"
130 expected_icon = (None)
131 expected_secondary_icon = (
132 "https://seccdn.libravatar.org/avatar/"
133 "01fe73d687f4db328da1183f2a1b5b22962ca9d9c50f0728aafeac974856311c"
134 "?s=64&d=retro")
135 expected_packages = set([])
136 expected_usernames = set(['pingou'])
137 msg = {
138 "username": "pingou",
139 "i": 1,
140 "timestamp": 1379638157.759283,
141 "msg_id": "2013-96f9ca0e-c7c6-43f0-9de7-7a268c7f1cef",
142 "topic": "fedoracollege.content.added",
143 "link": "https://FedoraCollege.org/testlink",
144 "msg": {
145 "title": "test",
146 "link": "https://testlink",
147 "active": True,
148 "date_added": "Tue, 01 Jul 2014 19:07:00 GMT",
149 "description": "The Content available on this\
150 website is contributed from people in fedora\
151 community. Mostly all\
152 the content has CC licence.</p>",
153 "id": 2,
154 "media_added_ids": "",
155 "slug": "about-the-content",
156 "tags": "fedora-college, blog",
157 "title": "About the content",
158 "type": "blog",
159 "username": "pingou"
160 }
161 }
162
163
164add_doc(locals())
165
166if __name__ == '__main__':
167 unittest.main()
0168
=== modified file 'fedmsg_meta_fedora_infrastructure/tests/github.py'
--- fedmsg_meta_fedora_infrastructure/tests/github.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/tests/github.py 2015-04-03 19:43:46 +0000
@@ -1483,6 +1483,88 @@
1483 }1483 }
14841484
14851485
1486class TestGithubWatch(Base):
1487 """ There exists `a service
1488 <https://apps.fedoraproject.org/github2fedmsg>`_ to link the select github
1489 repos of fedora contributors with the fedmsg bus.
1490
1491 Messages of *this* type are published whenever someone **watches a
1492 repository**.
1493 """
1494
1495 expected_title = "github.watch"
1496 expected_subti = "alikins started watching fedora-infra/summershum"
1497 expected_link = "https://github.com/fedora-infra/summershum/watchers"
1498 expected_icon = "https://apps.fedoraproject.org/img/icons/github.png"
1499 expected_secondary_icon = (
1500 "https://seccdn.libravatar.org/avatar/"
1501 "d23ffcf6c375ae6351f54b6d4e381c6910e68d666370e5ff21e4322cd56690bf"
1502 "?s=64&d=retro")
1503 expected_packages = set([])
1504 expected_usernames = set([])
1505 expected_objects = set([
1506 'fedora-infra/summershum/watchers',
1507 ])
1508 msg = {
1509 "source_name": "datanommer",
1510 "i": 1,
1511 "timestamp": 1403363334.0,
1512 "msg_id": "2014-5273bf43-d483-48d4-a8d6-11c988cae0cb",
1513 "topic": "org.fedoraproject.prod.github.watch",
1514 "source_version": "0.6.4",
1515 "msg": {
1516 "action": "started",
1517 "fas_usernames": {},
1518 "repository": {
1519 "has_wiki": False,
1520 "forks_count": 7,
1521 "updated_at": "2014-06-21T15:08:53Z",
1522 "private": False,
1523 "full_name": "fedora-infra/summershum",
1524 "owner": {
1525 "url": "https://api.github.com/users/fedora-infra",
1526 "site_admin": False,
1527 "html_url": "https://github.com/fedora-infra",
1528 "gravatar_id": "ebdef1eaaa4b1c1cb01f5570efbb3cc4",
1529 "login": "fedora-infra",
1530 "type": "Organization",
1531 "id": 3316637
1532 },
1533 "id": 16620564,
1534 "size": 907,
1535 "watchers_count": 10,
1536 "forks": 7,
1537 "homepage": "",
1538 "fork": False,
1539 "description": "fedmsg consumer that extracts hashes of "
1540 "source files",
1541 "has_downloads": True,
1542 "default_branch": "develop",
1543 "html_url": "https://github.com/fedora-infra/summershum",
1544 "has_issues": True,
1545 "stargazers_count": 10,
1546 "open_issues_count": 2,
1547 "watchers": 10,
1548 "name": "summershum",
1549 "language": "Python",
1550 "url": "https://api.github.com/repos/fedora-infra/summershum",
1551 "created_at": "2014-02-07T16:35:59Z",
1552 "pushed_at": "2014-06-13T12:11:18Z",
1553 "open_issues": 2
1554 },
1555 "sender": {
1556 "url": "https://api.github.com/users/alikins",
1557 "site_admin": False,
1558 "html_url": "https://github.com/alikins",
1559 "gravatar_id": "81877b32b5fac41db3207c94ecc26173",
1560 "login": "alikins",
1561 "type": "User",
1562 "id": 15162
1563 }
1564 }
1565 }
1566
1567
1486add_doc(locals())1568add_doc(locals())
14871569
1488if __name__ == '__main__':1570if __name__ == '__main__':
14891571
=== modified file 'fedmsg_meta_fedora_infrastructure/tests/jenkins.py'
--- fedmsg_meta_fedora_infrastructure/tests/jenkins.py 2014-05-18 18:33:16 +0000
+++ fedmsg_meta_fedora_infrastructure/tests/jenkins.py 2015-04-03 19:43:46 +0000
@@ -105,6 +105,84 @@
105 },105 },
106 }106 }
107107
108class TestJenkinsBuildAborted(Base):
109 """ `Jenkins <http://jenkins.cloud.fedoraproject.org/>`_ publishes these
110 messages when a build is aborted.
111 """
112 expected_title = "jenkins.build.aborted"
113 expected_subti = ("Jenkins project 'fedora-mobile' build aborted")
114 expected_secondary_icon = ''
115 expected_packages = set([])
116 expected_usernames = set([])
117 expected_objects = set([
118 'jenkins/fedora-mobile/build.aborted',
119 ])
120 expected_link = (
121 "http://jenkins.cloud.fedoraproject.org/job/fedora-mobile/165/")
122 msg = {
123 u'i': 1,
124 u'timestamp': 1390982532.0,
125 u'msg_id': u'2014-851eb465-56f2-4f3f-bf8a-2b86c95d1246',
126 u'topic': u'org.fedoraproject.prod.jenkins.build.aborted',
127 u'msg': {
128 u'project': 'fedora-mobile',
129 u'took': u'9.4 sec',
130 u'build': 165,
131 },
132 }
133
134class TestJenkinsBuildNotBuilt(Base):
135 """ `Jenkins <http://jenkins.cloud.fedoraproject.org/>`_ publishes these
136 messages when a build doesn't actually build (wat?).
137 """
138 expected_title = "jenkins.build.notbuilt"
139 expected_subti = ("Jenkins project 'fedora-mobile' did not build")
140 expected_secondary_icon = ''
141 expected_packages = set([])
142 expected_usernames = set([])
143 expected_objects = set([
144 'jenkins/fedora-mobile/build.notbuilt',
145 ])
146 expected_link = (
147 "http://jenkins.cloud.fedoraproject.org/job/fedora-mobile/165/")
148 msg = {
149 u'i': 1,
150 u'timestamp': 1390982532.0,
151 u'msg_id': u'2014-851eb465-56f2-4f3f-bf8a-2b86c95d1246',
152 u'topic': u'org.fedoraproject.prod.jenkins.build.notbuilt',
153 u'msg': {
154 u'project': 'fedora-mobile',
155 u'took': u'9.4 sec',
156 u'build': 165,
157 },
158 }
159
160class TestJenkinsBuildUnstable(Base):
161 """ `Jenkins <http://jenkins.cloud.fedoraproject.org/>`_ publishes these
162 messages when a build completes with warnings.
163 """
164 expected_title = "jenkins.build.unstable"
165 expected_subti = ("Jenkins project 'fedora-mobile' built with warnings")
166 expected_secondary_icon = ''
167 expected_packages = set([])
168 expected_usernames = set([])
169 expected_objects = set([
170 'jenkins/fedora-mobile/build.unstable',
171 ])
172 expected_link = (
173 "http://jenkins.cloud.fedoraproject.org/job/fedora-mobile/165/")
174 msg = {
175 u'i': 1,
176 u'timestamp': 1390982532.0,
177 u'msg_id': u'2014-851eb465-56f2-4f3f-bf8a-2b86c95d1246',
178 u'topic': u'org.fedoraproject.prod.jenkins.build.unstable',
179 u'msg': {
180 u'project': 'fedora-mobile',
181 u'took': u'9.4 sec',
182 u'build': 165,
183 },
184 }
185
108186
109add_doc(locals())187add_doc(locals())
110188
111189
=== modified file 'fedmsg_meta_fedora_infrastructure/tests/pkgdb.py'
--- fedmsg_meta_fedora_infrastructure/tests/pkgdb.py 2014-07-14 22:20:38 +0000
+++ fedmsg_meta_fedora_infrastructure/tests/pkgdb.py 2015-04-03 19:43:46 +0000
@@ -250,9 +250,9 @@
250 }250 }
251251
252252
253class TestPkgdbPackageUpdate(Base):253class TestPkgdbPackageUpdateStatus(Base):
254 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_254 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
255 publishes this message when metadata for a package is updated.255 publishes this message when the status of a package is updated.
256 """256 """
257 expected_title = "pkgdb.package.update.status"257 expected_title = "pkgdb.package.update.status"
258 expected_subti = "ralph unretired guake in F-18"258 expected_subti = "ralph unretired guake in F-18"
@@ -297,6 +297,42 @@
297 }297 }
298 }298 }
299299
300class TestPkgdbPackageUpdate(Base):
301 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
302 publishes this message when metadata for a package is updated.
303 """
304 expected_title = "pkgdb.package.update"
305 expected_subti = "pkgdb_updater updated: summary, description of guake"
306 expected_link = "https://admin.fedoraproject.org/pkgdb/package/guake/"
307 expected_icon = ("https://apps.fedoraproject.org/packages/images/icons/"
308 "package_128x128.png")
309 expected_secondary_icon = (
310 "https://seccdn.libravatar.org/avatar/"
311 "1ff483b03adb34142ac55a5efecfa71b0149d57566f86d969905005b0ab98def"
312 "?s=64&d=retro")
313 expected_packages = set(['guake'])
314 expected_usernames = set(['pkgdb_updater'])
315 expected_objects = set(['guake/update'])
316 msg = {
317 "username": "apache",
318 "i": 144,
319 "timestamp": 1379605523.496933,
320 "msg_id": "2013-c131fb95-0a2e-4426-95c3-09766e017d29",
321 "topic": "org.fedoraproject.dev.pkgdb.package.update",
322 "msg": {
323 "package": {
324 "status": "Approved",
325 "upstream_url": "http://guake.org",
326 "name": "guake",
327 "creation_date": 1379619917.0,
328 "summary": "Top down terminal for GNOME",
329 "review_url": "https://bugzilla.redhat.com/450189"
330 },
331 "agent": "pkgdb_updater",
332 "fields": ["summary", "description"],
333 }
334 }
335
300336
301class TestPkgdbBranchClone(Base):337class TestPkgdbBranchClone(Base):
302 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_338 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
@@ -359,7 +395,7 @@
359 }395 }
360396
361397
362class TestPkgdbPackageRetire(Base):398class TestLegacyPkgdbPackageRetire(Base):
363 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_399 """ The Fedora `Package DB <https://admin.fedoraproject.org/pkgdb>`_
364 publishes messages on this topic when a package is retired. For example:400 publishes messages on this topic when a package is retired. For example:
365 """401 """
366402
=== modified file 'setup.py'
--- setup.py 2014-07-14 22:20:38 +0000
+++ setup.py 2015-04-03 19:43:46 +0000
@@ -101,7 +101,7 @@
101101
102setup(102setup(
103 name='fedmsg_meta_fedora_infrastructure',103 name='fedmsg_meta_fedora_infrastructure',
104 version='0.2.15',104 version='0.2.18',
105 description=105 description=
106 "fedmsg metadata providers for Fedora Infrastructure's deployment",106 "fedmsg metadata providers for Fedora Infrastructure's deployment",
107 long_description=long_description,107 long_description=long_description,

Subscribers

People subscribed via source and target branches

to all changes: