cfg2cmd test: hardcode/mock bridge MTU

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@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-06-17 10:30:13 +02:00
parent 456071e59c
commit 121e340094

View File

@ -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(