Skip to content

Commit

Permalink
fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Nov 9, 2024
1 parent 86617a1 commit 07476d8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src-colladmin/actions/zookeeper_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 07476d8

Please sign in to comment.