From 7631ab34ec75d1285a1434ae48a341a9a4bf36c4 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 29 Jul 2024 12:52:38 +0900 Subject: [PATCH] rpm: indent Signed-off-by: Kentaro Hayashi --- serverspec/kafka/confluent.rb | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/serverspec/kafka/confluent.rb b/serverspec/kafka/confluent.rb index a453dd9d7..b9fe8b936 100644 --- a/serverspec/kafka/confluent.rb +++ b/serverspec/kafka/confluent.rb @@ -2,32 +2,32 @@ require "rdkafka" if ["redhat", "amazon"].include?(os[:family]) -describe "rdkafka" do - it "can receive message via Rdkafka client" do - config = { - "bootstrap.servers": "localhost:9092", - "group.id": "test" - } - consumer = Rdkafka::Config.new(config).consumer - consumer.subscribe("test") + describe "rdkafka" do + it "can receive message via Rdkafka client" do + config = { + "bootstrap.servers": "localhost:9092", + "group.id": "test" + } + consumer = Rdkafka::Config.new(config).consumer + consumer.subscribe("test") - wait_for_consumer_assignment(consumer) + wait_for_consumer_assignment(consumer) - `echo "Hello, rdkafka" | /usr/bin/kafka-console-producer --broker-list localhost:9092 --topic test` + `echo "Hello, rdkafka" | /usr/bin/kafka-console-producer --broker-list localhost:9092 --topic test` - message = consumer.each { |message| break message } - expect(message.payload).to eq "Hello, rdkafka" + message = consumer.each { |message| break message } + expect(message.payload).to eq "Hello, rdkafka" + end end -end -describe "fluent-plugin-kafka" do - it "can receive message via fluent-plugin-kafka" do - `echo "Hello, fluent-plugin-kafka" | /usr/bin/kafka-console-producer --broker-list localhost:9092 --topic test` - Dir.glob("/tmp/log/td-agent/*.log") do |path| - File.open(path) do |file| - expect(JSON.parse(file.readlines.last)["message"]).to eq "Hello, fluent-plugin-kafka" + describe "fluent-plugin-kafka" do + it "can receive message via fluent-plugin-kafka" do + `echo "Hello, fluent-plugin-kafka" | /usr/bin/kafka-console-producer --broker-list localhost:9092 --topic test` + Dir.glob("/tmp/log/td-agent/*.log") do |path| + File.open(path) do |file| + expect(JSON.parse(file.readlines.last)["message"]).to eq "Hello, fluent-plugin-kafka" + end end end end end -end