|
8 | 8 | context 'when not on Linux' do
|
9 | 9 | it 'is set to nil' do
|
10 | 10 | Facter.fact(:kernel).expects(:value).at_least(1).returns('SunOs')
|
11 |
| - Facter.value(:volume_groups).should be_nil |
| 11 | + expect(Facter.value(:volume_groups)).to be_nil |
12 | 12 | end
|
13 | 13 | end
|
14 | 14 |
|
|
24 | 24 | end
|
25 | 25 |
|
26 | 26 | it 'is set to nil' do
|
27 |
| - Facter.value(:volume_groups).should be_nil |
| 27 | + expect(Facter.value(:volume_groups)).to be_nil |
28 | 28 | end
|
29 | 29 | end
|
30 | 30 |
|
|
36 | 36 |
|
37 | 37 | it 'is able to resolve vgs' do
|
38 | 38 | vgs_output = <<-OUTPUT
|
39 |
| - ZcFkEG-217a-nnc6-PvWx-oXou-7THt-XR6eci centos wz--n- writeable normal 19.51g 44.00m |
40 |
| - tMqdQC-ukEx-bEft-bLk8-WoM1-jX0a-0p1rri tasks wz--n- writeable normal 3.99g 2.82g |
| 39 | + ZcFkEG-217a-nnc6-PvWx-oXou-7THt-XR6eci centos wz--n- writeable normal 953864,00 126472,00 4,00 238466 31618 |
| 40 | + tMqdQC-ukEx-bEft-bLk8-WoM1-jX0a-0p1rri tasks wz--n- writeable normal 55540,00 6388,00 4,00 13885 1597 |
41 | 41 | OUTPUT
|
42 | 42 | vgs_output.lstrip!
|
43 | 43 | Facter::Core::Execution.expects(:exec).at_least(1).returns(vgs_output)
|
44 |
| - Facter.value(:volume_groups).should include('centos' => { |
45 |
| - 'uuid' => 'ZcFkEG-217a-nnc6-PvWx-oXou-7THt-XR6eci', |
46 |
| - 'attr' => 'wz--n-', 'permissions' => 'writeable', |
47 |
| - 'allocation_policy' => 'normal', |
48 |
| - 'size' => '19.51g', |
49 |
| - 'free' => '44.00m' |
50 |
| - }, |
51 |
| - 'tasks' => { |
52 |
| - 'uuid' => 'tMqdQC-ukEx-bEft-bLk8-WoM1-jX0a-0p1rri', |
53 |
| - 'attr' => 'wz--n-', |
54 |
| - 'permissions' => 'writeable', |
55 |
| - 'allocation_policy' => 'normal', |
56 |
| - 'size' => '3.99g', |
57 |
| - 'free' => '2.82g', |
58 |
| - }) |
| 44 | + expect(Facter.value(:volume_groups)).to include( |
| 45 | + 'centos' => { |
| 46 | + 'uuid' => 'ZcFkEG-217a-nnc6-PvWx-oXou-7THt-XR6eci', |
| 47 | + 'attr' => 'wz--n-', 'permissions' => 'writeable', |
| 48 | + 'allocation_policy' => 'normal', |
| 49 | + 'size' => '953864,00', |
| 50 | + 'free' => '126472,00', |
| 51 | + 'extent_size' => '4,00', |
| 52 | + 'extent_count' => '238466', |
| 53 | + 'free_count' => '31618' |
| 54 | + }, |
| 55 | + 'tasks' => { |
| 56 | + 'uuid' => 'tMqdQC-ukEx-bEft-bLk8-WoM1-jX0a-0p1rri', |
| 57 | + 'attr' => 'wz--n-', |
| 58 | + 'permissions' => 'writeable', |
| 59 | + 'allocation_policy' => 'normal', |
| 60 | + 'size' => '55540,00', |
| 61 | + 'free' => '6388,00', |
| 62 | + 'extent_size' => '4,00', |
| 63 | + 'extent_count' => '13885', |
| 64 | + 'free_count' => '1597', |
| 65 | + }, |
| 66 | + ) |
59 | 67 | end
|
60 | 68 | end
|
61 | 69 | end
|
|
0 commit comments