Fix all of the sample notification calls.
This commit is contained in:
parent
c5bd2a5002
commit
2efaee6aef
1 changed files with 35 additions and 5 deletions
|
@ -92,7 +92,13 @@ class RepoPushEvent(NotificationEvent):
|
|||
return 'Repository %s updated' % (event_data['repository'])
|
||||
|
||||
def get_sample_data(self, notification):
|
||||
return build_event_data(notification.repository, {
|
||||
# TODO(jzelinskie): remove when more endpoints have been converted to using
|
||||
# interfaces
|
||||
repo = AttrDict({
|
||||
'namespace_name': notification.repository.namespace_user.username,
|
||||
'name': notification.repository.name,
|
||||
})
|
||||
return build_event_data(repo, {
|
||||
'updated_tags': {'latest': 'someimageid', 'foo': 'anotherimage'},
|
||||
'pruned_image_count': 3
|
||||
})
|
||||
|
@ -196,7 +202,13 @@ class BuildQueueEvent(BaseBuildEvent):
|
|||
def get_sample_data(self, notification):
|
||||
build_uuid = 'fake-build-id'
|
||||
|
||||
return build_event_data(notification.repository, {
|
||||
# TODO(jzelinskie): remove when more endpoints have been converted to using
|
||||
# interfaces
|
||||
repo = AttrDict({
|
||||
'namespace_name': notification.repository.namespace_user.username,
|
||||
'name': notification.repository.name,
|
||||
})
|
||||
return build_event_data(repo, {
|
||||
'is_manual': False,
|
||||
'build_id': build_uuid,
|
||||
'build_name': 'some-fake-build',
|
||||
|
@ -235,7 +247,13 @@ class BuildStartEvent(BaseBuildEvent):
|
|||
def get_sample_data(self, notification):
|
||||
build_uuid = 'fake-build-id'
|
||||
|
||||
return build_event_data(notification.repository, {
|
||||
# TODO(jzelinskie): remove when more endpoints have been converted to using
|
||||
# interfaces
|
||||
repo = AttrDict({
|
||||
'namespace_name': notification.repository.namespace_user.username,
|
||||
'name': notification.repository.name,
|
||||
})
|
||||
return build_event_data(repo, {
|
||||
'build_id': build_uuid,
|
||||
'build_name': 'some-fake-build',
|
||||
'docker_tags': ['latest', 'foo', 'bar'],
|
||||
|
@ -263,7 +281,13 @@ class BuildSuccessEvent(BaseBuildEvent):
|
|||
def get_sample_data(self, notification):
|
||||
build_uuid = 'fake-build-id'
|
||||
|
||||
return build_event_data(notification.repository, {
|
||||
# TODO(jzelinskie): remove when more endpoints have been converted to using
|
||||
# interfaces
|
||||
repo = AttrDict({
|
||||
'namespace_name': notification.repository.namespace_user.username,
|
||||
'name': notification.repository.name,
|
||||
})
|
||||
return build_event_data(repo, {
|
||||
'build_id': build_uuid,
|
||||
'build_name': 'some-fake-build',
|
||||
'docker_tags': ['latest', 'foo', 'bar'],
|
||||
|
@ -292,7 +316,13 @@ class BuildFailureEvent(BaseBuildEvent):
|
|||
def get_sample_data(self, notification):
|
||||
build_uuid = 'fake-build-id'
|
||||
|
||||
return build_event_data(notification.repository, {
|
||||
# TODO(jzelinskie): remove when more endpoints have been converted to using
|
||||
# interfaces
|
||||
repo = AttrDict({
|
||||
'namespace_name': notification.repository.namespace_user.username,
|
||||
'name': notification.repository.name,
|
||||
})
|
||||
return build_event_data(repo, {
|
||||
'build_id': build_uuid,
|
||||
'build_name': 'some-fake-build',
|
||||
'docker_tags': ['latest', 'foo', 'bar'],
|
||||
|
|
Reference in a new issue