Diskmanage: replace check for zpool binary with a function and mock it
so the test still works when it's not installed. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
26de022b56
commit
525b4a6ebe
@ -244,6 +244,8 @@ $diskmanage_module->mock('dir_is_empty' => sub {
|
||||
return 1;
|
||||
});
|
||||
print("\tMocked dir_is_empty\n");
|
||||
$diskmanage_module->mock('check_bin' => sub { return 1; });
|
||||
print("\tMocked check_bin\n");
|
||||
my $tools_module= new Test::MockModule('PVE::ProcFSTools', no_auto => 1);
|
||||
$tools_module->mock('parse_proc_mounts' => \&mocked_parse_proc_mounts);
|
||||
print("\tMocked parse_proc_mounts\n");
|
||||
|
||||
Reference in New Issue
Block a user