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