Skip to content

Commit a4a56ef

Browse files
committed
Fixed quoting and variable name
1 parent e6fd733 commit a4a56ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vagrant/templates/demoscript/kafka-demo.sh.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ done
5050

5151
create_and_verify_topic() {
5252
# Check if topic exists by checking the REST API on worker node
53-
TOPIC_EXISTS=`curl -s -XGET -H 'Accept: application/vnd.kafka.v2+json' 'http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP:$PORT_REST_PROXY/topics/$TOPIC_NAME' | jq '.message | @text'`
53+
TOPIC_EXISTS=`curl -s -XGET -H "Accept: application/vnd.kafka.v2+json" "http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP:$PORT_REST_PROXY/topics/$TOPIC_NAME" | jq '.message | @text'`
5454

5555
# Create topic if not exists
5656
if [[ "$TOPIC_EXISTS" =~ "Topic not found" ]]; then
5757
echo "OK: Topic $TOPIC_NAME does not exist yet."
5858
echo "Creating test topic: $TOPIC_NAME"
59-
echo "Talking to broker: $FIRST_BROKER"
59+
echo "Talking to broker: $KAFKA_LOCAL_BROKER_FIRST_IP"
6060
kafka-topics --create --zookeeper $KAFKA_LOCAL_BROKER_FIRST_IP:$PORT_ZOOKEEPER --replication-factor $REPLICATION_FACTOR --partitions $PARTITIONS --topic $TOPIC_NAME
6161
sleep 2
6262
else
@@ -71,7 +71,7 @@ kafka-topics --zookeeper $KAFKA_LOCAL_BROKER_FIRST_IP:$PORT_ZOOKEEPER --describe
7171

7272
echo ""
7373
echo "Verify topic $TOPIC_NAME through REST PROXY:"
74-
curl -s -XGET -H 'Accept: application/vnd.kafka.v2+json' 'http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP:$PORT_REST_PROXY/topics/$TOPIC_NAME' | jq '.'
74+
curl -s -XGET -H "Accept: application/vnd.kafka.v2+json" "http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP:$PORT_REST_PROXY/topics/$TOPIC_NAME" | jq '.'
7575
}
7676

7777

0 commit comments

Comments
 (0)