From 4836e98901a5476c57a7b6978460361ccd1a5f97 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 6 Dec 2024 17:25:18 +0100 Subject: [PATCH] test: fix file_size_info() mocking Pass along all parameters. Signed-off-by: Fiona Ebner --- src/test/list_volumes_test.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm index e264802..7b6df6a 100644 --- a/src/test/list_volumes_test.pm +++ b/src/test/list_volumes_test.pm @@ -487,8 +487,7 @@ $mock_stat->redefine(populate => sub { # override info provided by qemu-img in file_size_info my $mock_fsi = Test::MockModule->new('PVE::Storage::Plugin', no_auto => 1); $mock_fsi->redefine(file_size_info => sub { - my ($filename, $timeout) = @_; - my ($size, $format, $used, $parent, $ctime) = $mock_fsi->original('file_size_info')->($filename, $timeout); + my ($size, $format, $used, $parent, $ctime) = $mock_fsi->original('file_size_info')->(@_); $size = DEFAULT_SIZE; $used = DEFAULT_USED;