From 121e340094cd4d5a3056193257fc301548dd51e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 17 Jun 2020 10:30:13 +0200 Subject: [PATCH] cfg2cmd test: hardcode/mock bridge MTU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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 31681765..b5c0a271 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(