[pve-devel] applied: [PATCH qemu-server] cfg2cmd test: hardcode/mock bridge MTU

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jun 17 10:43:09 CEST 2020


otherwise the netdev test reads the MTU value from the test host's vmbr0
bridge, or fails if no such bridge exists.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
might make sense to extend this to actually test the functionality/MTU
handling, but just unbreaking the test for now..

 test/run_config2command_tests.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl
index 3168176..b5c0a27 100755
--- a/test/run_config2command_tests.pl
+++ b/test/run_config2command_tests.pl
@@ -207,6 +207,15 @@ EOF
     },
 );
 
+my $pve_common_network;
+$pve_common_network = Test::MockModule->new('PVE::Network');
+$pve_common_network->mock(
+    read_bridge_mtu => sub {
+	return 1500;
+    },
+);
+
+
 my $pve_common_inotify;
 $pve_common_inotify = Test::MockModule->new('PVE::INotify');
 $pve_common_inotify->mock(
-- 
2.20.1





More information about the pve-devel mailing list