[pve-devel] [PATCH qemu-server 7/12] test: mock existing files
Daniel Herzig
d.herzig at proxmox.com
Fri Oct 25 17:02:38 CEST 2024
Let all files checked by file_exists appear as existing if the path
does not contain the string 'I_DO_NOT_EXIST'.
Signed-off-by: Daniel Herzig <d.herzig at proxmox.com>
---
test/run_config2command_tests.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl
index eda89dcb..3414eea7 100755
--- a/test/run_config2command_tests.pl
+++ b/test/run_config2command_tests.pl
@@ -210,6 +210,10 @@ $qemu_server_module->mock(
cleanup_pci_devices => {
# do nothing
},
+ file_exists => sub {
+ my $file_path = shift;
+ return 1 if !($file_path =~ m|I_DO_NOT_EXIST|);
+ },
);
my $qemu_server_config;
--
2.39.5
More information about the pve-devel
mailing list