Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
rtib committed Jul 14, 2023
1 parent 5ceaeee commit 9d2cbbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/facter/volume_group_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
[
vg,
Facter::Core::Execution.exec("vgs -o pv_name #{vg} --noheading --nosuffix")
.split("\n")
.map { |x| x.strip }
.join(',')
.split("\n")
.map(&:strip)
.join(','),
]
end
end
Expand Down
10 changes: 6 additions & 4 deletions spec/unit/facter/logical_volumes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
Facter::Core::Execution.expects('which').with('lvs').returns('/sbin/lvs')
end

# rubocop:disable RSpec/ExampleLength
it 'is able to resolve VGs' do
lvs_output = <<-OUTPUT
E7qan8-4NGf-jq2P-l11v-6fFe-MPHK-T6IGzl root centos/root /dev/centos/root /dev/mapper/centos-root -wi-ao---- linear public active 18.46g writeable centos
Expand All @@ -56,7 +57,7 @@
'active' => 'active',
'size' => '800.00m',
'permissions' => 'writeable',
'vg_name' => 'tasks',
'vg_name' => 'tasks'
},
'lame_tasks' => {
'uuid' => 'gmNS3G-cAhA-vRj0-2Uf0-21yO-QVdy-LNXfBv',
Expand All @@ -69,7 +70,7 @@
'active' => 'active',
'size' => '400.00m',
'permissions' => 'writeable',
'vg_name' => 'tasks',
'vg_name' => 'tasks'
},
'root' => {
'uuid' => 'E7qan8-4NGf-jq2P-l11v-6fFe-MPHK-T6IGzl',
Expand All @@ -82,7 +83,7 @@
'active' => 'active',
'size' => '18.46g',
'permissions' => 'writeable',
'vg_name' => 'centos',
'vg_name' => 'centos'
},
'swap' => {
'uuid' => 'buUXDX-GDUh-rN2t-y80n-vtCt-xhhu-XSZ5kA',
Expand All @@ -95,9 +96,10 @@
'active' => 'active',
'size' => '1.00g',
'permissions' => 'writeable',
'vg_name' => 'centos',
'vg_name' => 'centos'
})
end
# rubocop:enable RSpec/ExampleLength
end
end
end

0 comments on commit 9d2cbbf

Please sign in to comment.