33 Automatically generates secdist config from user static config.
34 `_bootstrap_servers` is testsuite's fixture that determines current
35 bootstrap servers list depends on Kafka testsuite plugin's settings.
37 @snippet samples/kafka_service/testsuite/conftest.py Kafka service sample - secdist
39 @ingroup userver_testsuite_fixtures
43 'brokers': _bootstrap_servers,
47 logging.info(f
'Kafka brokers are: {single_setting["brokers"]}')
50 secdist_config[
'kafka_settings'] = {}
52 components = service_config[
'components_manager'][
'components']
53 for component_name
in components:
54 is_kafka_producer = component_name.startswith(
'kafka-producer')
55 is_kafka_consumer = component_name.startswith(
'kafka-consumer')
56 if is_kafka_producer
or is_kafka_consumer:
57 secdist_config[
'kafka_settings'][component_name] = single_setting
59 return json.dumps(secdist_config)