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 May 7, 2024
1 parent c30ba08 commit 8dbf700
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ncm-network/src/test/perl/nmstate_advance.t
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,7 @@ is($ibyml, $IB_YML, "Exact ib0 yml config");
my $ibpkyml = get_file_contents("/etc/nmstate/ib1.12345.yml");
is($ibpkyml, $IBPKEY_YML, "Exact ib1 pkey yml config");

my $vlanyml3 = get_file_contents("/etc/nmstate/vlan.0.yml");
is($vlanyml3, $VLAN0_YML, "Exact vlan.0 yml config");

done_testing();
10 changes: 9 additions & 1 deletion ncm-network/src/test/resources/nmstate_advance.pan
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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";
Expand All @@ -55,3 +55,11 @@ prefix "/system/network/interfaces/ib1.12345";
"netmask" = "255.255.255.0";
"broadcast" = "10.11.15.255";
"type" = "Infiniband";
"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 8dbf700

Please sign in to comment.