diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-01-21 14:24:03 +0000 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-01-22 14:55:45 +0000 |
commit | 31c61d495474985b8cc3460464f888651d0919ed (patch) | |
tree | 72ac562f9bd64196fda57edd8ca6a62f8877b046 /csit/resources/tests/kafka_consumer.py | |
parent | caa7adc30ed054d2a5cfea4a1b9a265d5cfb6785 (diff) |
Add kafka support in K8s CSIT
Issue-ID: POLICY-4402
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I29ef966ed5eb70997574269ff6180f68d754383b
Diffstat (limited to 'csit/resources/tests/kafka_consumer.py')
-rwxr-xr-x | csit/resources/tests/kafka_consumer.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/csit/resources/tests/kafka_consumer.py b/csit/resources/tests/kafka_consumer.py index 595e3db7..fa173f47 100755 --- a/csit/resources/tests/kafka_consumer.py +++ b/csit/resources/tests/kafka_consumer.py @@ -27,9 +27,9 @@ import sys import time -def consume_kafka_topic(topic, expected_values, timeout): +def consume_kafka_topic(topic, expected_values, timeout, bootstrap_server): config = { - 'bootstrap.servers': 'localhost:29092', + 'bootstrap.servers': bootstrap_server, 'group.id': 'testgrp', 'auto.offset.reset': 'earliest' } @@ -63,4 +63,5 @@ if __name__ == '__main__': topic_name = sys.argv[1] timeout = int(sys.argv[2]) # timeout in seconds for verifying the kafka topic expected_values = sys.argv[3] - consume_kafka_topic(topic_name, expected_values, timeout) + bootstrap_server = sys.argv[4] + consume_kafka_topic(topic_name, expected_values, timeout, bootstrap_server) |