Set context properly for reporter
This commit is contained in:
parent
d7f34fc6dd
commit
df5fa87d2d
|
@ -76,7 +76,7 @@ class GiteaStatusPush(http.HttpStatusPushBase):
|
|||
payload['target_url'] = target_url
|
||||
|
||||
if context is not None:
|
||||
payload['name'] = context
|
||||
payload['context'] = context
|
||||
|
||||
return self._http.post(
|
||||
'/api/v1/repos/{owner}/{repository}/statuses/{sha}'.format(
|
||||
|
|
|
@ -66,19 +66,19 @@ class TestGiteaStatusPush(
|
|||
'/api/v1/repos/buildbot/buildbot/statuses/d34db33fd43db33f',
|
||||
json={'state': 'pending',
|
||||
'target_url': 'http://localhost:8080/#builders/79/builds/0',
|
||||
'description': 'Build started.', 'name': 'buildbot/Builder0'})
|
||||
'description': 'Build started.', 'context': 'buildbot/Builder0'})
|
||||
self._http.expect(
|
||||
'post',
|
||||
'/api/v1/repos/buildbot/buildbot/statuses/d34db33fd43db33f',
|
||||
json={'state': 'success',
|
||||
'target_url': 'http://localhost:8080/#builders/79/builds/0',
|
||||
'description': 'Build done.', 'name': 'buildbot/Builder0'})
|
||||
'description': 'Build done.', 'context': 'buildbot/Builder0'})
|
||||
self._http.expect(
|
||||
'post',
|
||||
'/api/v1/repos/buildbot/buildbot/statuses/d34db33fd43db33f',
|
||||
json={'state': 'failure',
|
||||
'target_url': 'http://localhost:8080/#builders/79/builds/0',
|
||||
'description': 'Build done.', 'name': 'buildbot/Builder0'})
|
||||
'description': 'Build done.', 'context': 'buildbot/Builder0'})
|
||||
|
||||
build['complete'] = False
|
||||
self.sp.buildStarted(("build", 20, "started"), build)
|
||||
|
@ -98,7 +98,7 @@ class TestGiteaStatusPush(
|
|||
'/api/v1/repos/buildbot/buildbot/statuses/d34db33fd43db33f',
|
||||
json={'state': 'pending',
|
||||
'target_url': 'http://localhost:8080/#builders/79/builds/0',
|
||||
'description': 'Build started.', 'name': 'buildbot/Builder0'})
|
||||
'description': 'Build started.', 'context': 'buildbot/Builder0'})
|
||||
build['complete'] = False
|
||||
self.sp.buildStarted(("build", 20, "started"), build)
|
||||
|
||||
|
@ -112,7 +112,7 @@ class TestGiteaStatusPush(
|
|||
'/api/v1/repos/buildbot/buildbot/statuses/d34db33fd43db33f',
|
||||
json={'state': 'pending',
|
||||
'target_url': 'http://localhost:8080/#builders/79/builds/0',
|
||||
'description': 'Build started.', 'name': 'buildbot/Builder0'})
|
||||
'description': 'Build started.', 'context': 'buildbot/Builder0'})
|
||||
build['complete'] = False
|
||||
self.sp.buildStarted(("build", 20, "started"), build)
|
||||
|
||||
|
@ -153,7 +153,7 @@ class TestGiteaStatusPush(
|
|||
'/api/v1/repos/buildbot/buildbot/statuses/d34db33fd43db33f',
|
||||
json={'state': 'pending',
|
||||
'target_url': 'http://localhost:8080/#builders/79/builds/0',
|
||||
'description': 'Build started.', 'name': 'buildbot/Builder0'},
|
||||
'description': 'Build started.', 'context': 'buildbot/Builder0'},
|
||||
content_json={'message': 'sha1 not found for branch master'},
|
||||
code=404)
|
||||
build['complete'] = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user