Skip to content

Commit

Permalink
nmstate: add a new test after previous mod
Browse files Browse the repository at this point in the history
  • Loading branch information
jouvin committed Apr 18, 2024
1 parent 2d90da2 commit 5b9837d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ncm-network/src/test/perl/nmstate_advance.t
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,7 @@ is($vlanyml, $VLAN_YML, "Exact eth0.123 vlan yml config");

my $vlanyml2 = get_file_contents("/etc/nmstate/vlan0.yml");
is($vlanyml2, $VLAN0_YML, "Exact vlan0 yml config");

my $vlanyml3 = get_file_contents("/etc/nmstate/vlan.0.yml");
is($vlanyml3, $VLAN0_YML, "Exact vlan.0 yml config");
done_testing();
11 changes: 9 additions & 2 deletions ncm-network/src/test/resources/nmstate_advance.pan
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@ prefix "/system/network/interfaces/eth0.123";
"physdev" = "eth0";
"route/0" = dict("address", "1.2.3.4");

# test vlan interface route on vlan for backward compatibily with network.pm
# test vlan interface route on vlan0 for backward compatibily with network.pm
"/system/network/interfaces/vlan0" = create("defaultinterface");
prefix "/system/network/interfaces/vlan0";
"device" = "eth0.123";
"physdev" = "eth0";
"route/0" = dict("address", "1.2.3.4");
"route/0" = dict("address", "1.2.3.4");

# test vlan interface route on vlan.0 for backward compatibily with network.pm
"/system/network/interfaces/vlan.0" = create("defaultinterface");
prefix "/system/network/interfaces/vlan.0";
"device" = "eth0.123";
"physdev" = "eth0";
"route/0" = dict("address", "1.2.3.4");

0 comments on commit 5b9837d

Please sign in to comment.