]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: add tests for mgmt get-data exact node request 15154/head
authorIgor Ryzhov <iryzhov@nfware.com>
Sat, 13 Jan 2024 22:54:08 +0000 (00:54 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 15 Jan 2024 08:27:33 +0000 (10:27 +0200)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
tests/topotests/mgmt_oper/simple-results/result-intf-eth0-description-exact.json [new file with mode: 0644]
tests/topotests/mgmt_oper/simple-results/result-intf-eth0-exact.json [new file with mode: 0644]
tests/topotests/mgmt_oper/test_simple.py

diff --git a/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-description-exact.json b/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-description-exact.json
new file mode 100644 (file)
index 0000000..e00f23c
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "frr-interface:description": "r1-eth0-desc"
+}
diff --git a/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-exact.json b/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-exact.json
new file mode 100644 (file)
index 0000000..f04e3a5
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "frr-interface:interface": [
+    {
+      "name": "r1-eth0",
+      "vrf": "default",
+      "state": {
+        "if-index": "rubout",
+        "mtu": 1500,
+        "mtu6": 1500,
+        "speed": 10000,
+        "metric": 0,
+        "phy-address": "rubout"
+      },
+      "frr-zebra:zebra": {
+        "state": {
+          "up-count": 0,
+          "down-count": 0
+        }
+      }
+    }
+  ]
+}
index 2f75dfc822f2ebf49702c5c70f201dcc48810d8b..a52d125ecfa49df1c8be958e538f5cb4c6920960 100644 (file)
@@ -127,6 +127,16 @@ def test_oper_simple(tgen):
             "simple-results/result-intf-description.json",
             "with-config",
         ),
+        (
+            '/frr-interface:lib/interface[name="r1-eth0"]',
+            "simple-results/result-intf-eth0-exact.json",
+            "exact",
+        ),
+        (
+            '/frr-interface:lib/interface[name="r1-eth0"]/description',
+            "simple-results/result-intf-eth0-description-exact.json",
+            "with-config exact",
+        ),
         # Interface state
         (
             '/frr-interface:lib/interface[name="r1-eth0"]/state',