Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Support for epelbeta compose messages. Fixes #52.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jan 10, 2014
1 parent 5dc92b4 commit af85111
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fedmsg_meta_fedora_infrastructure/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def subtitle(self, msg, **config):
# Some old messages in datanommer don't have that branch field,
# so we have to extract it from the topic.
branch = msg['topic'].split('.')[-3]
if branch == 'compose':
branch = msg['topic'].split('.')[-2]

arch = msg['msg'].get('arch', '')
arch = arch and ' (%s)' % arch
Expand Down Expand Up @@ -78,6 +80,8 @@ def link(self, msg, **config):
if 'rawhide' in msg['topic']:
return "http://kojipkgs.fedoraproject.org/mash/rawhide-" + \
datetime.fromtimestamp(msg['timestamp']).strftime('%Y%m%d')
elif 'epelbeta' in msg['topic']:
base = "https://dl.fedoraproject.org/pub/epel/beta/7"
else:
base = "https://dl.fedoraproject.org/pub/" + \
"fedora/linux/development"
Expand Down
19 changes: 19 additions & 0 deletions fedmsg_meta_fedora_infrastructure/tests/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,25 @@ class TestComposeBranchedComplete(Base):
}


class TestComposeEPELBetaComplete(Base):
""" The `release engineering
<http://fedoraproject.org/wiki/ReleaseEngineering>`_ "compose" scripts
produce these messages when they have **finished composing** the EPEL beta.
"""
expected_title = "compose.epelbeta.complete"
expected_subti = "epelbeta compose completed"
expected_link = "https://dl.fedoraproject.org/pub/epel/beta/7/"
expected_objects = set(['epelbeta/primary'])
msg = {
"i": 1,
"timestamp": 1344447839.891876,
"topic": "org.fedoraproject.prod.compose.epelbeta.complete",
"msg": {
"log": "done",
},
}


class TestComposeBranchedStart(Base):
""" The `release engineering
<http://fedoraproject.org/wiki/ReleaseEngineering>`_ "compose" scripts
Expand Down

0 comments on commit af85111

Please sign in to comment.