Skip to content

Commit

Permalink
Merge pull request #213 from fedora-infra/feature/more-longform-condi…
Browse files Browse the repository at this point in the history
…tionals

Make github longform tests conditional.
  • Loading branch information
ralphbean committed Feb 25, 2015
2 parents bc73988 + 0a99a62 commit b030cf9
Show file tree
Hide file tree
Showing 3 changed files with 408 additions and 362 deletions.
353 changes: 1 addition & 352 deletions fedmsg_meta_fedora_infrastructure/tests/__init__.py
Expand Up @@ -51,364 +51,13 @@
from fedmsg_meta_fedora_infrastructure.tests.fas import *
from fedmsg_meta_fedora_infrastructure.tests.hotness import *
from fedmsg_meta_fedora_infrastructure.tests.mm2 import *
from fedmsg_meta_fedora_infrastructure.tests.zodbot import *

from fedmsg_meta_fedora_infrastructure.tests.base import Base

from fedmsg_meta_fedora_infrastructure.tests.common import add_doc


full_irc_logs = """======================================
#fedora-meeting-1: RELENG (2015-02-09)
======================================
Meeting started by dgilmore at 16:31:17 UTC. The full logs are available
at
http://meetbot.fedoraproject.org/fedora-meeting-1/2015-02-09/releng.2015-02-09-16.31.log.html
.
Meeting summary
---------------
* init process (dgilmore, 16:31:30)
* Secondary Architectures updates (dgilmore, 16:33:42)
* Secondary Architectures update - ppc (dgilmore, 16:33:43)
* Secondary Architectures update - s390 (dgilmore, 16:36:35)
* Secondary Architectures update - arm (dgilmore, 16:37:12)
* #6016 Use fedpkg-minimal in Fedora buildroots (dgilmore, 16:39:22)
* LINK: https://fedorahosted.org/rel-eng/ticket/6016 (dgilmore,
16:39:38)
* LINK: https://koji.fedoraproject.org/koji/buildinfo?buildID=609961
(bochecha, 16:40:40)
* #5959 Enable keep-alive connections for koji (primary and secondaries)
(dgilmore, 16:41:44)
* LINK: https://fedorahosted.org/rel-eng/ticket/5959 (dgilmore,
16:41:56)
* ACTION: pbrobinson to send patch to infra list enabling keepalive
(dgilmore, 16:43:08)
* #6023 allow Peter Robinson to restart sigul bridges (dgilmore,
16:43:39)
* LINK: https://fedorahosted.org/rel-eng/ticket/6023 (dgilmore,
16:43:48)
* #6027 secondary arch old mash trees cleanup (dgilmore, 16:45:31)
* LINK: https://fedorahosted.org/rel-eng/ticket/6027 (dgilmore,
16:45:47)
* #6096 add individual email addressses to Fedoras GPG keys (dgilmore,
16:52:06)
* LINK: https://fedorahosted.org/rel-eng/ticket/6096 (dgilmore,
16:52:20)
* ACTION: dgilmore will make a choice when making the keys (dgilmore,
16:58:51)
* #6100 create bsd-style checksum files for CHECKSUM files (dgilmore,
16:59:11)
* LINK: https://fedorahosted.org/rel-eng/ticket/6100 (dgilmore,
16:59:22)
* ACTION: dgilmore to make this happen (dgilmore, 17:03:13)
* open floor (dgilmore, 17:03:21)
Meeting ended at 17:58:27 UTC.
Action Items
------------
* pbrobinson to send patch to infra list enabling keepalive
* dgilmore will make a choice when making the keys
* dgilmore to make this happen
Action Items, by person
-----------------------
* dgilmore
* dgilmore will make a choice when making the keys
* dgilmore to make this happen
* pbrobinson
* pbrobinson to send patch to infra list enabling keepalive
* **UNASSIGNED**
* (none)
People Present (lines said)
---------------------------
* dgilmore (116)
* bochecha (33)
* tyll (16)
* pbrobinson (16)
* zodbot (5)
* janeznemanic (1)
* masta (1)
* nirik (0)
* sharkcz (0)
Generated by `MeetBot`_ 0.1.4
.. _`MeetBot`: http://wiki.debian.org/MeetBot
"""

class TestSupybotStartMeetingNoName(Base):
""" Trusty old `zodbot <https://meetbot.fedoraproject.org/>`_ publishes
messages too! Messages on this topic get published (somewhat obviously)
when a new IRC meeting is started. The user starting the meeting may
specify a meeting title, but doesn't have to. Here's an example
message with no meeting title specified:
"""
expected_title = "meetbot.meeting.start"
expected_subti = 'ralph started a meeting in #channel'
expected_icon = 'https://apps.fedoraproject.org/img/icons/meetbot.png'
expected_secondary_icon = "https://seccdn.libravatar.org/avatar/" + \
"9c9f7784935381befc302fe3c814f9136e7a33953d0318761669b8643f4df55c?s=64&d=retro"
expected_usernames = set(['ralph'])
expected_objects = set([
'attendees/ralph',
'channels/#channel',
])

msg = {
"i": 16,
"msg": {
"meeting_topic": None,
"attendees": {
"zodbot": 2,
"threebean": 2
},
"chairs": {},
"url": "http://logs.com/awesome",
"owner": "threebean",
"channel": "#channel"
},
"topic": "org.fedoraproject.dev.meetbot.meeting.start",
"timestamp": 1345572862.556145
}


class TestSupybotStartMeeting(Base):
""" Trusty old `zodbot <https://meetbot.fedoraproject.org/>`_ publishes
messages too! Messages on this topic get published (somewhat obviously)
when a new IRC meeting is started. The user starting the meeting may
specify a meeting title, but doesn't have to. Here's an example
message with a specified meeting title:
"""
expected_title = "meetbot.meeting.start"
expected_subti = 'ralph started meeting "title" in #channel'
expected_usernames = set(['ralph'])
expected_objects = set([
'attendees/ralph',
'channels/#channel',
'titles/title',
])

msg = {
"i": 16,
"msg": {
"meeting_topic": "title",
"attendees": {
"zodbot": 2,
"threebean": 2
},
"chairs": {},
"url": "http://logs.com/awesome",
"owner": "threebean",
"channel": "#channel"
},
"topic": "org.fedoraproject.dev.meetbot.meeting.start",
"timestamp": 1345572862.556145
}


class TestSupybotEndMeeting(Base):
""" Trusty old `zodbot <https://meetbot.fedoraproject.org/>`_ publishes
messages too! Messages on this topic get published when an IRC meeting
ends. Meetings may or may not have a title (which can be tricky).
Here's an example message where the title is specified:
"""
expected_title = "meetbot.meeting.complete"
expected_subti = 'dgilmore\'s meeting titled "RELENG (2015-02-09)" ' + \
'ended in #fedora-meeting-1'
expected_long_form = expected_subti + "\n\n" + full_irc_logs
expected_link = 'https://meetbot.fedoraproject.org/fedora-meeting-1/' + \
'2015-02-09/releng.2015-02-09-16.31.html'
expected_usernames = set([
'masta',
'nirik',
'tyll',
'bochecha',
'pbrobinson',
'sharkcz',
'janeznemanic',
'dgilmore',
])
expected_objects = set([
'attendees/masta',
'attendees/nirik',
'attendees/tyll',
'attendees/bochecha',
'attendees/pbrobinson',
'attendees/sharkcz',
'attendees/janeznemanic',
'attendees/dgilmore',
'channels/#fedora-meeting-1',
'titles/RELENG (2015-02-09)',
'topics/open floor',
])

msg = {
"source_name": "datanommer",
"i": 94,
"timestamp": 1423504707.0,
"msg_id": "2015-ff043996-5aaa-471b-bc87-b8551f7fd3b6",
"topic": "org.fedoraproject.prod.meetbot.meeting.complete",
"source_version": "0.6.4",
"msg": {
"meeting_topic": "RELENG (2015-02-09)",
"attendees": {
"masta": 1,
"nirik": 0,
"tyll": 16,
"zodbot": 5,
"bochecha": 33,
"pbrobinson": 16,
"sharkcz": 0,
"janeznemanic": 1,
"dgilmore": 116
},
"chairs": {
"masta": True,
"nirik": True,
"tyll": True,
"bochecha": True,
"pbrobinson": True,
"dgilmore": True,
"sharkcz": True
},
"topic": "open floor",
"url": "http://meetbot.fedoraproject.org/fedora-meeting-1/2015-02-09/releng.2015-02-09-16.31",
"owner": "dgilmore",
"channel": "#fedora-meeting-1"
}
}


class TestSupybotEndMeetingNoTitle(Base):
""" Trusty old `zodbot <https://meetbot.fedoraproject.org/>`_ publishes
messages too! Messages on this topic get published when an IRC meeting
ends. Meetings may or may not have a title (which can be tricky).
Here's an example message where the title is **not** specified:
"""
expected_title = "meetbot.meeting.complete"
expected_subti = 'ralph\'s meeting ended in #channel'
expected_link = 'https://logs.com/awesome.html'
expected_usernames = set(['ralph'])
expected_objects = set([
'attendees/ralph',
'channels/#channel',
])

msg = {
"i": 16,
"msg": {
"meeting_topic": None,
"attendees": {
"zodbot": 2,
"threebean": 2
},
"chairs": {},
"url": "http://logs.com/awesome",
"owner": "threebean",
"channel": "#channel"
},
"topic": "org.fedoraproject.dev.meetbot.meeting.complete",
"timestamp": 1345572862.556145
}


class TestSupybotChangeTopic(Base):
""" As IRC meetings chug along, the chairperson may change the meeting;
zodbot publishes message for that! An example **with** a title specified:
"""
expected_title = "meetbot.meeting.topic.update"
expected_subti = 'The topic of ralph\'s "title" meeting changed ' +\
'to "Food" in #channel'
expected_usernames = set(['ralph'])
expected_objects = set([
'attendees/ralph',
'channels/#channel',
'titles/title',
'topics/Food',
])

msg = {
"i": 16,
"msg": {
"meeting_topic": "title",
"attendees": {
"zodbot": 2,
"threebean": 2
},
"chairs": {},
"url": "http://logs.com/awesome",
"owner": "threebean",
"channel": "#channel",
"topic": "Food",
},
"topic": "org.fedoraproject.dev.meetbot.meeting.topic.update",
"timestamp": 1345572862.556145
}


class TestSupybotChangeTopicNoTitle(Base):
""" As IRC meetings chug along, the chairperson may change the meeting;
zodbot publishes message for that! An example **without** a title
specified:
"""
expected_title = "meetbot.meeting.topic.update"
expected_subti = 'The topic of ralph\'s meeting changed ' +\
'to "Food" in #channel'
expected_usernames = set(['ralph'])
expected_objects = set([
'attendees/ralph',
'channels/#channel',
'topics/Food'
])

msg = {
"i": 16,
"msg": {
"meeting_topic": None,
"attendees": {
"zodbot": 2,
"threebean": 2
},
"chairs": {},
"url": "http://logs.com/awesome",
"owner": "threebean",
"channel": "#channel",
"topic": "Food",
},
"topic": "org.fedoraproject.dev.meetbot.meeting.topic.update",
"timestamp": 1345572862.556145
}


class TestMediaWikiEdit(Base):
""" Fedora's `Wiki <https://fedoraproject.org/wiki>`_ has a fedmsg hook
that publishes messages like this one when a user edits a page.
Expand Down

0 comments on commit b030cf9

Please sign in to comment.