Skip to content

Commit

Permalink
new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Rousse authored and Guillaume Rousse committed Apr 17, 2012
1 parent 50d0884 commit b96fced
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions resources/lvm/linux/vgs/linux-3
@@ -0,0 +1,2 @@
vg0 1 5 0 wz--n- 53791.95 18694.01 4D8fsm-J18u-IBB8-0TDT-tdIc-qDWr-COXhld 4.19
vg1 2 1 0 wz--n- 364174.64 4.19 8VYDvK-WrSD-5v8m-UgyR-g7GR-V4hK-y7q2On 4.19
25 changes: 23 additions & 2 deletions t/inventory/linux/lvm.t
Expand Up @@ -218,6 +218,28 @@ my %vgs = (
LV_COUNT => '16',
VG_EXTENT_SIZE => '33.55'
}
],
'linux-3' => [
{
SIZE => 53791,
ATTR => 'wz--n-',
VG_NAME => 'vg0',
FREE => 18694,
PV_COUNT => '1',
VG_UUID => '4D8fsm-J18u-IBB8-0TDT-tdIc-qDWr-COXhld',
LV_COUNT => '5',
VG_EXTENT_SIZE => '4.19'
},
{
SIZE => 364174,
ATTR => 'wz--n-',
VG_NAME => 'vg1',
FREE => 4,
PV_COUNT => '2',
VG_UUID => '8VYDvK-WrSD-5v8m-UgyR-g7GR-V4hK-y7q2On',
LV_COUNT => '1',
VG_EXTENT_SIZE => '4.19'
}
]
);

Expand All @@ -228,8 +250,7 @@ plan tests =>

foreach my $test (keys %pvs) {
my @pvs = FusionInventory::Agent::Task::Inventory::Input::Linux::LVM::_getPhysicalVolumes(file => "resources/lvm/linux/pvs/$test");
is_deeply(\@pvs, $pvs{$test}, "physical volumes list: $test") or print Dumper(\@pvs);
use Data::Dumper;
is_deeply(\@pvs, $pvs{$test}, "physical volumes list: $test");
}

foreach my $test (keys %lvs) {
Expand Down

0 comments on commit b96fced

Please sign in to comment.