[pve-devel] [PATCH v2 2/12] qemuserver: add helper function for mocking files
Daniel Herzig
d.herzig at proxmox.com
Fri Jan 17 12:36:53 CET 2025
Daniel Kral <d.kral at proxmox.com> writes:
> On 1/13/25 09:55, Daniel Herzig wrote:
>> This stub function can be used for mocking a file's existance in testruns.
>> Signed-off-by: Daniel Herzig <d.herzig at proxmox.com>
>> ---
>> PVE/QemuServer.pm | 5 +++++
>> 1 file changed, 5 insertions(+)
>> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
>> index 5cde94a1..d07c170e 100644
>> --- a/PVE/QemuServer.pm
>> +++ b/PVE/QemuServer.pm
>> @@ -8999,4 +8999,9 @@ sub delete_ifaces_ipams_ips {
>> }
>> }
>> +sub file_exists {
>> + my $file_path = shift;
>> + return -e $file_path
>> +}
>> +
>> 1;
>
> nit: I think this could be squashed into patch #3.
Right, good point, this would make things more compact.
More information about the pve-devel
mailing list