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