]> git.proxmox.com Git - pve-common.git/blame - test/etc_network_interfaces/t.bridge_eth_remove_auto.pl
fix keyAlias test
[pve-common.git] / test / etc_network_interfaces / t.bridge_eth_remove_auto.pl
CommitLineData
21d32c95
WB
1use strict;
2
3# access to the current config
4our $config;
5
6# replace proc_net_dev with one with a bunch of interfaces
7save('proc_net_dev', <<'/proc/net/dev');
8eth0:
9eth1:
10/proc/net/dev
11
12r('');
13update_iface('eth0', [], autostart => 1);
14update_iface('eth1', [], autostart => 1);
15r(w());
16die "autostart lost" if !$config->{ifaces}->{eth0}->{autostart};
17die "autostart lost" if !$config->{ifaces}->{eth1}->{autostart};
18new_iface("vmbr0", 'bridge', [{ family => 'inet' }], bridge_ports => 'eth0');
19new_iface("vmbr1", 'OVSBridge', [{ family => 'inet' }], ovs_ports => 'eth1');
20r(w());
aeac55e1 21die "autostart wrongly removed for linux bridge port" if !$config->{ifaces}->{eth0}->{autostart};
21d32c95
WB
22die "autostart not removed for ovs bridge port" if $config->{ifaces}->{eth1}->{autostart};
23
241;