From 8dbf700aa24d133cf18dd1d9d9acd65b768650ac Mon Sep 17 00:00:00 2001 From: Michel Jouvin Date: Thu, 18 Apr 2024 10:11:33 +0200 Subject: [PATCH] nmstate: add a new test after previous mod --- ncm-network/src/test/perl/nmstate_advance.t | 2 ++ ncm-network/src/test/resources/nmstate_advance.pan | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ncm-network/src/test/perl/nmstate_advance.t b/ncm-network/src/test/perl/nmstate_advance.t index 8b30e414aa..5ca0a23285 100644 --- a/ncm-network/src/test/perl/nmstate_advance.t +++ b/ncm-network/src/test/perl/nmstate_advance.t @@ -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(); diff --git a/ncm-network/src/test/resources/nmstate_advance.pan b/ncm-network/src/test/resources/nmstate_advance.pan index 0f65a76d9f..4c6e054844 100644 --- a/ncm-network/src/test/resources/nmstate_advance.pan +++ b/ncm-network/src/test/resources/nmstate_advance.pan @@ -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"; @@ -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");