From 07476d8bafdf0c41e7a72410425e14f7a3f5de4b Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Fri, 8 Nov 2024 17:16:42 -0800 Subject: [PATCH] fix rubocop --- src-colladmin/actions/zookeeper_action.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src-colladmin/actions/zookeeper_action.rb b/src-colladmin/actions/zookeeper_action.rb index d079f3a..caa14d3 100644 --- a/src-colladmin/actions/zookeeper_action.rb +++ b/src-colladmin/actions/zookeeper_action.rb @@ -126,14 +126,16 @@ def get_data(n) def test_node(path, n) return if @zk.exists?(n) - result = {path: path, test: "Test: #{n} should exist", status: 'FAIL'} + + result = { path: path, test: "Test: #{n} should exist", status: 'FAIL' } @test_results.append([result[:path], result[:test], result[:status]]) @buf << "\n #{result[:test]}: #{result[:status]}" unless @buf.nil? end def test_not_node(path, n) return unless @zk.exists?(n) - result = {path: path, test: "Test: #{n} should NOT exist", status: 'FAIL'} + + result = { path: path, test: "Test: #{n} should NOT exist", status: 'FAIL' } @test_results.append([result[:path], result[:test], result[:status]]) @buf << "\n #{result[:test]}: #{result[:status]}" unless @buf.nil? end @@ -232,12 +234,13 @@ def initialize(config, action, path, myparams) super @mode = 'test' end + def table_headers - ['Path', 'Test', 'Status'] + %w[Path Test Status] end def table_types - ['name', 'name', 'status'] + %w[name name status] end def table_rows(_body)