Sha256: e873591a94b39fc6c944da1ee1e2564310d5f994a9b44249b1e6688dafd37742

Contents?: true

Size: 1.26 KB

Versions: 210

Compression:

Stored size: 1.26 KB

Contents

require 'spec_helper'

## Output from 'df -kP'
str = <<-EOH
Filesystem  1024-blocks       Used   Available Capacity Mounted on
/dev/sd0a       1013006      58408      903948     6%   /
/dev/sd0e       1822574         18     1731428     0%   /home
/dev/sd0d       3093230     372244     2566326    13%   /usr
EOH

describe Specinfra::HostInventory::Filesystem do
  let(:host_inventory) { nil }
  describe 'Example OpenBSD release 5.7' do
    ret = Specinfra::HostInventory::Filesystem.new(host_inventory).parse(str)
    example "/dev/sd0a" do
      expect(ret["/dev/sd0a"]).to include(
       "kb_available" => "903948",
       "kb_size"      => "1013006",
       "kb_used"      => "58408",
       "mount"        => "/",
       "percent_used" => "6%"
      )
    end
    example "/dev/sd0d" do
      expect(ret["/dev/sd0d"]).to include(
       "kb_available" => "2566326",
       "kb_size"      => "3093230",
       "kb_used"      => "372244",
       "mount"        => "/usr",
       "percent_used" => "13%"
      )
    end
    example "/dev/sd0e" do
      expect(ret["/dev/sd0e"]).to include(
       "kb_available" => "1731428",
       "kb_size"      => "1822574",
       "kb_used"      => "18",
       "mount"        => "/home",
       "percent_used" => "0%"
      )
    end
  end
end

Version data entries

210 entries across 210 versions & 3 rubygems

Version Path
specinfra-2.91.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.90.1 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.90.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.89.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.88.2 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.88.1 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.88.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.87.2 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.87.1 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.87.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.86.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.85.1 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.85.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.84.1 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.84.0 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.83.4 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.83.3 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.83.2 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.83.1 spec/host_inventory/openbsd/filesystem_spec.rb
specinfra-2.83.0 spec/host_inventory/openbsd/filesystem_spec.rb