From 55b2e3ff0cdad05ef64bffb32aaff3e87ffb1880 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 29 Jul 2024 14:17:52 +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 e5e35f302..4912fdcea 100644 --- a/serverspec/kafka/confluent.rb +++ b/serverspec/kafka/confluent.rb @@ -2,32 +2,32 @@ require "rdkafka" if ["redhat", "amazon", "debian"].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