SAM0123-231: Remove Kafka integration from Ingestor service.
This commit is contained in:
@@ -9,8 +9,6 @@ from ingestor.ingestor import Ingestor
|
||||
@patch('ingestor.ingestor.NotificationHandler')
|
||||
def test___init__(notification_handler, getenv):
|
||||
getenv.side_effect = [
|
||||
'localhost:9092,localhost:35', # KAFKA_SERVERS
|
||||
'true', # EXPORT_TO_KAFKA
|
||||
'localhost', # REDIS_HOST
|
||||
'63790', # REDIS_PORT
|
||||
'user', # REDIS_USERNAME
|
||||
@@ -27,7 +25,6 @@ def test___init__(notification_handler, getenv):
|
||||
|
||||
ingestor = Ingestor()
|
||||
|
||||
getenv.assert_any_call('KAFKA_SERVERS', 'localhost:9092')
|
||||
getenv.assert_any_call('REDIS_HOST', 'localhost')
|
||||
getenv.assert_any_call('REDIS_PORT', '6379')
|
||||
getenv.assert_any_call('REDIS_USERNAME', None)
|
||||
@@ -37,7 +34,6 @@ def test___init__(notification_handler, getenv):
|
||||
getenv.assert_any_call('HOSTNAME', 'localhost')
|
||||
getenv.assert_any_call('POLL_INTERVAL', '5')
|
||||
|
||||
assert ingestor.kafka_servers == ['localhost:9092', 'localhost:35']
|
||||
assert ingestor.redis_host == 'localhost'
|
||||
assert ingestor.redis_port == 63790
|
||||
assert ingestor.redis_username == 'user'
|
||||
@@ -124,7 +120,6 @@ async def test_prepare_ingestor(ingestor_manager_mock, ingestor):
|
||||
await ingestor.prepare_ingestor()
|
||||
|
||||
ingestor_manager_mock.assert_called_once_with(
|
||||
kafka_servers=','.join(ingestor.kafka_servers),
|
||||
redis_data={
|
||||
'host': ingestor.redis_host,
|
||||
'port': ingestor.redis_port,
|
||||
@@ -139,7 +134,6 @@ async def test_prepare_ingestor(ingestor_manager_mock, ingestor):
|
||||
metadata=ingestor.metadata,
|
||||
logger=ingestor.logger,
|
||||
notification_handler=ingestor.notification_handler,
|
||||
export_to_kafka=ingestor.export_to_kafka,
|
||||
metrics_controller=ingestor.metrics_controller,
|
||||
)
|
||||
ingestor_manager.declare_active.assert_called_once()
|
||||
|
||||
Reference in New Issue
Block a user