]> git.proxmox.com Git - pve-common.git/blame - test/etc_network_interfaces/t.base-auto-allow-hotplug.pl
bump version to 8.2.1
[pve-common.git] / test / etc_network_interfaces / t.base-auto-allow-hotplug.pl
CommitLineData
0dc7fd7b
TL
1my $active_ifaces = ['lo', 'ens18', 'ens'];
2my $proc_net = load('proc_net_dev');
3$proc_net =~ s/eth0/ens18/;
4
5my $wanted = load('base-allow-hotplug');
6
7# parse the config
8r($wanted, $proc_net, $active_ifaces);
9
10$wanted =~ s/allow-hotplug ens18/auto ens18/; # FIXME: hack! rather we need to keep allow-hotplug!
11
12expect $wanted;
13
14# idempotency (save, re-parse, and re-check)
15r(w(), $proc_net, $active_ifaces);
16expect $wanted;
17
18# parse one with both, "auto" and "allow-hotplug"
19my $bad = load('base-auto-allow-hotplug');
20r($bad, $proc_net, $active_ifaces);
21
22# should drop the first occuring one of the conflicting options ("auto" currently)
23expect $wanted;
24
251;