From f3b56f3819972c293bcf18a1bb0616ce9cb254cc Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Mon, 8 Jul 2024 12:53:19 +0100 Subject: [PATCH] jsoning empty stdout --- spec/services/logstash_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/services/logstash_spec.rb b/spec/services/logstash_spec.rb index d402660..34dfb14 100644 --- a/spec/services/logstash_spec.rb +++ b/spec/services/logstash_spec.rb @@ -26,6 +26,7 @@ describe "Checking service status for #{service}..." do pipelines = command("knife node show #{HOSTNAME} --attribute default.pipelines -F json").stdout.strip + pipelines = '{}' if pipelines == '' parsed_pipelines = JSON.parse(pipelines) if parsed_pipelines.empty? || parsed_pipelines.nil?