Skip to content

Commit

Permalink
Merge pull request #2098 from sebastian-miclea/FACT-2748-2
Browse files Browse the repository at this point in the history
(FACT-2748) Fixed type for blockdevice_*_size
  • Loading branch information
oanatmaria authored Sep 21, 2020
2 parents 1f30000 + a0b9718 commit fa574e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/facter/facts/linux/disks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def call_the_resolver
def add_legacy_facts(disks, facts)
disks.each do |disk_name, disk_info|
facts.push(Facter::ResolvedFact.new("blockdevice_#{disk_name}_model", disk_info[:model], :legacy))
facts.push(Facter::ResolvedFact.new("blockdevice_#{disk_name}_size", disk_info[:size_bytes].to_s, :legacy))
facts.push(Facter::ResolvedFact.new("blockdevice_#{disk_name}_size", disk_info[:size_bytes], :legacy))
facts.push(Facter::ResolvedFact.new("blockdevice_#{disk_name}_vendor", disk_info[:vendor], :legacy))
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/facter/facts/linux/disks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
an_object_having_attributes(name: 'disks', value: expecte_response),
an_object_having_attributes(name: 'blockdevices', value: 'sda'),
an_object_having_attributes(name: 'blockdevice_sda_model', value: 'Virtual disk', type: :legacy),
an_object_having_attributes(name: 'blockdevice_sda_size', value: '21474836480', type: :legacy),
an_object_having_attributes(name: 'blockdevice_sda_size', value: 21_474_836_480, type: :legacy),
an_object_having_attributes(name: 'blockdevice_sda_vendor', value: 'VMware', type: :legacy)
)
end
Expand Down

0 comments on commit fa574e9

Please sign in to comment.