forked from packit/packit-service-fedmsg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to org.fedoraproject.prod.pagure.git.receive
Related to packit/packit-service#2305
- Loading branch information
1 parent
3f4773e
commit d29df6e
Showing
5 changed files
with
136 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"body": { | ||
"agent": "cathay4t", | ||
"authors": [ | ||
{ | ||
"fullname": "Packit", | ||
"name": null, | ||
"url_path": null | ||
}, | ||
{ | ||
"full_url": "https://src.fedoraproject.org/user/yselkowitz", | ||
"fullname": "Yaakov Selkowitz", | ||
"name": "yselkowitz", | ||
"url_path": "user/yselkowitz" | ||
} | ||
], | ||
"branch": "1.2.17-rawhide-update-pull_from_upstream", | ||
"changed_files": { | ||
"nispor.spec": "M" | ||
}, | ||
"end_commit": "e134a94872e6cdf0b421667bef35843ffc2e2794", | ||
"forced": true, | ||
"old_commit": "04c956ebf012f0e053dced9275d5c8ebdd080edd", | ||
"repo": { | ||
"access_groups": { | ||
"admin": [], | ||
"collaborator": [], | ||
"commit": [], | ||
"ticket": [] | ||
}, | ||
"access_users": { | ||
"admin": [], | ||
"collaborator": [], | ||
"commit": ["cathay4t", "ffmancera"], | ||
"owner": ["packit"], | ||
"ticket": [] | ||
}, | ||
"close_status": [], | ||
"custom_keys": [], | ||
"date_created": "1695187712", | ||
"date_modified": "1701990754", | ||
"description": "The nispor package\n", | ||
"full_url": "https://src.fedoraproject.org/fork/packit/rpms/nispor", | ||
"fullname": "forks/packit/rpms/nispor", | ||
"id": 66339, | ||
"milestones": {}, | ||
"name": "nispor", | ||
"namespace": "rpms", | ||
"parent": { | ||
"access_groups": { | ||
"admin": [], | ||
"collaborator": [], | ||
"commit": [], | ||
"ticket": [] | ||
}, | ||
"access_users": { | ||
"admin": ["ffmancera"], | ||
"collaborator": [], | ||
"commit": [], | ||
"owner": ["cathay4t"], | ||
"ticket": [] | ||
}, | ||
"close_status": [], | ||
"custom_keys": [], | ||
"date_created": "1599236259", | ||
"date_modified": "1603815379", | ||
"description": "The nispor package\n", | ||
"full_url": "https://src.fedoraproject.org/rpms/nispor", | ||
"fullname": "rpms/nispor", | ||
"id": 45300, | ||
"milestones": {}, | ||
"name": "nispor", | ||
"namespace": "rpms", | ||
"parent": null, | ||
"priorities": {}, | ||
"tags": [], | ||
"url_path": "rpms/nispor", | ||
"user": { | ||
"full_url": "https://src.fedoraproject.org/user/cathay4t", | ||
"fullname": "Gris Ge", | ||
"name": "cathay4t", | ||
"url_path": "user/cathay4t" | ||
} | ||
}, | ||
"priorities": {}, | ||
"tags": [], | ||
"url_path": "fork/packit/rpms/nispor", | ||
"user": { | ||
"full_url": "https://src.fedoraproject.org/user/packit", | ||
"fullname": "Packit Bot", | ||
"name": "packit", | ||
"url_path": "user/packit" | ||
} | ||
}, | ||
"start_commit": "a80772d8fdc093a2080bda050daf4e66bff585eb", | ||
"total_commits": 2 | ||
}, | ||
"headers": { | ||
"fedora_messaging_schema": "pagure.git.receive", | ||
"fedora_messaging_severity": 20, | ||
"fedora_messaging_user_cathay4t": true, | ||
"sent-at": "2024-02-08T07:29:14+00:00" | ||
}, | ||
"id": "d98e4f3f-2e6a-4634-b86b-8abbae9c54d3", | ||
"queue": null, | ||
"topic": "org.fedoraproject.prod.pagure.git.receive" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import json | ||
|
||
from celery import Celery | ||
from fedora_messaging import message | ||
from flexmock import flexmock | ||
|
||
from packit_service_fedmsg.consumer import Consumerino | ||
from tests.spellbook import DATA_DIR | ||
|
||
|
||
def test_git_receive(): | ||
flexmock(Celery).should_receive("send_task").and_return(flexmock(id="a")).once() | ||
with open(DATA_DIR / "git_receive.json") as outfile: | ||
json_msg = json.load(outfile) | ||
msg = message.loads(json.dumps(json_msg)) | ||
c = Consumerino() | ||
c(msg[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters