]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: add unit-test for choice/case node queries
authorChristian Hopps <chopps@labn.net>
Sat, 22 Feb 2025 14:09:38 +0000 (14:09 +0000)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sat, 22 Feb 2025 20:07:56 +0000 (20:07 +0000)
Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit 73df7da40a107eab52a6819e6325d950ba569220)

tests/lib/northbound/test_oper_data.in
tests/lib/northbound/test_oper_data.refout

index 0053148953cfe305f57a2707f3dd8872dd334460..94fcdc1e1c59389de4a569dbbea2a242727b46df 100644 (file)
@@ -2,4 +2,8 @@ show yang operational-data /frr-test-module:frr-test-module
 show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[2]
 show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[3]/interface
 show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[10]
+show yang operational-data /frr-test-module:frr-test-module/c1value
+show yang operational-data /frr-test-module:frr-test-module/c2cont
+show yang operational-data /frr-test-module:frr-test-module/c2cont/
+show yang operational-data /frr-test-module:frr-test-module/c2cont/c2value
 test rpc
index 2536e0306b9ea1884ac524686f0ea74468f654c8..57061d03716f95bc3b237b08ee9c8174c16d7fff 100644 (file)
@@ -174,6 +174,36 @@ test# show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name=
 }\r
 test# show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[10]
 {}\r
+test# show yang operational-data /frr-test-module:frr-test-module/c1value
+{
+  "frr-test-module:frr-test-module": {
+    "c1value": 21
+  }
+}
+test# show yang operational-data /frr-test-module:frr-test-module/c2cont
+{
+  "frr-test-module:frr-test-module": {
+    "c2cont": {
+      "c2value": 2868969987
+    }
+  }
+}
+test# show yang operational-data /frr-test-module:frr-test-module/c2cont/
+{
+  "frr-test-module:frr-test-module": {
+    "c2cont": {
+      "c2value": 2868969987
+    }
+  }
+}
+test# show yang operational-data /frr-test-module:frr-test-module/c2cont/c2value
+{
+  "frr-test-module:frr-test-module": {
+    "c2cont": {
+      "c2value": 2868969987
+    }
+  }
+}
 test# test rpc
 vrf testname data testdata
 test#