mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-03 01:18:01 +03:00
test: fix file_size_info() mocking
Pass along all parameters. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
39fd552d14
commit
4836e98901
@ -487,8 +487,7 @@ $mock_stat->redefine(populate => sub {
|
|||||||
# override info provided by qemu-img in file_size_info
|
# override info provided by qemu-img in file_size_info
|
||||||
my $mock_fsi = Test::MockModule->new('PVE::Storage::Plugin', no_auto => 1);
|
my $mock_fsi = Test::MockModule->new('PVE::Storage::Plugin', no_auto => 1);
|
||||||
$mock_fsi->redefine(file_size_info => sub {
|
$mock_fsi->redefine(file_size_info => sub {
|
||||||
my ($filename, $timeout) = @_;
|
my ($size, $format, $used, $parent, $ctime) = $mock_fsi->original('file_size_info')->(@_);
|
||||||
my ($size, $format, $used, $parent, $ctime) = $mock_fsi->original('file_size_info')->($filename, $timeout);
|
|
||||||
|
|
||||||
$size = DEFAULT_SIZE;
|
$size = DEFAULT_SIZE;
|
||||||
$used = DEFAULT_USED;
|
$used = DEFAULT_USED;
|
||||||
|
Loading…
Reference in New Issue
Block a user