summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-18 12:19:57 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-03-20 10:02:55 -0500
commitfbf871b3cdbbe6fd4fd6cad3281adc24438acc79 (patch)
tree7f8212bb8a40e2e8c44dbf713c6b67df846cfadd
parent39364b6a9f8c385b805ad01b0c14b313b29426be (diff)
downloadvyos-1x-fbf871b3cdbbe6fd4fd6cad3281adc24438acc79.tar.gz
vyos-1x-fbf871b3cdbbe6fd4fd6cad3281adc24438acc79.zip
T7246: update libvyosconfig hash and add nosetest
-rw-r--r--Makefile2
-rw-r--r--src/tests/test_config_parser.py4
-rw-r--r--tests/data/config.valid1
3 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 72b3d2784..051694e9a 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ libvyosconfig:
rm -rf /tmp/libvyosconfig && \
git clone https://github.com/vyos/libvyosconfig.git /tmp/libvyosconfig || exit 1
cd /tmp/libvyosconfig && \
- git checkout 5f15d8095efd11756a867e552a3f8fe6c77e57cc || exit 1
+ git checkout 55b2d352333e3cfcb54d2057b73cef6ebe8331f9 || exit 1
eval $$(opam env --root=/opt/opam --set-root) && ./build.sh
fi
diff --git a/src/tests/test_config_parser.py b/src/tests/test_config_parser.py
index 9a4f02859..1b4a57311 100644
--- a/src/tests/test_config_parser.py
+++ b/src/tests/test_config_parser.py
@@ -51,3 +51,7 @@ class TestConfigParser(TestCase):
def test_rename_duplicate(self):
with self.assertRaises(vyos.configtree.ConfigTreeError):
self.config.rename(["top-level-tag-node", "foo"], "bar")
+
+ def test_leading_slashes(self):
+ self.assertTrue(self.config.exists(["normal-node", "value-with-leading-slashes"]))
+ self.assertEqual(self.config.return_value(["normal-node", "value-with-leading-slashes"]), "//other-value")
diff --git a/tests/data/config.valid b/tests/data/config.valid
index 0836bf60b..024e5e05c 100644
--- a/tests/data/config.valid
+++ b/tests/data/config.valid
@@ -26,6 +26,7 @@ normal-node {
}
}
option-with-quoted-value "some-value"
+ value-with-leading-slashes "//other-value"
}
trailing-leaf-node-option some-value