fix: update name of topic used to publish CERTIFICATE_CREATED events

[APER-2347]

This PR updates the name of the topic we are publishing our `CERTIFICATE_CREATED` events to. We had put a very generic name when writing the publishing code (and this was way before the actual topic was created). Now that the Confluent configuration is ready we need to update the name in our publishing code.
This commit is contained in:
Justin Hynes
2023-06-06 17:57:30 +00:00
parent ddf32206af
commit a631a05a26
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ def listen_for_certificate_created_event(sender, signal, **kwargs):
if SEND_CERTIFICATE_CREATED_SIGNAL.is_enabled():
get_producer().send(
signal=CERTIFICATE_CREATED,
topic='certificates',
topic='learning-certificate-lifecycle',
event_key_field='certificate.course.course_key',
event_data={'certificate': kwargs['certificate']},
event_metadata=kwargs['metadata']

View File

@@ -513,5 +513,5 @@ class CertificateEventBusTests(ModuleStoreTestCase):
data = mock_producer.return_value.send.call_args.kwargs
assert data['signal'].event_type == CERTIFICATE_CREATED.event_type
assert data['event_data']['certificate'] == expected_certificate_data
assert data['topic'] == 'certificates'
assert data['topic'] == 'learning-certificate-lifecycle'
assert data['event_key_field'] == 'certificate.course.course_key'