summaryrefslogtreecommitdiffstats
path: root/csit
diff options
context:
space:
mode:
authoremaclee <lee.anjella.macabuhay@est.tech>2022-12-21 09:29:24 +0000
committeremaclee <lee.anjella.macabuhay@est.tech>2022-12-22 09:44:40 +0000
commit5452b5ea786a3e7def19c1f328c43ec264da38d5 (patch)
treeb7988ce69ee08cc3121c50785b7baac887dcf9ad /csit
parente52d0cbf970f1de982fb64f1a052646457b81f52 (diff)
Add fix for posting nodes with xPath with '/'
- YangUtils method changed from using REGEX to cps path parser - unit test added for cps path util Issue-ID: CPS-1433 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ibb9efdd09423f9bade4a4a557d7d9ed49aa44ef4
Diffstat (limited to 'csit')
-rw-r--r--csit/data/test-tree.json6
-rw-r--r--csit/tests/cps-data/cps-data.robot4
2 files changed, 5 insertions, 5 deletions
diff --git a/csit/data/test-tree.json b/csit/data/test-tree.json
index 89d6784275..8f4b522799 100644
--- a/csit/data/test-tree.json
+++ b/csit/data/test-tree.json
@@ -2,11 +2,11 @@
"test-tree": {
"branch": [
{
- "name": "Left",
+ "name": "LEFT/left",
"nest": {
- "name": "Small",
+ "name": "SMALL/small",
"birds": [
- "Sparrow",
+ "SPARROW/sparrow",
"Robin",
"Finch"
]
diff --git a/csit/tests/cps-data/cps-data.robot b/csit/tests/cps-data/cps-data.robot
index 2da2b73414..096bd07b79 100644
--- a/csit/tests/cps-data/cps-data.robot
+++ b/csit/tests/cps-data/cps-data.robot
@@ -44,10 +44,10 @@ Create Data Node
Get Data Node by XPath
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
- ${params}= Create Dictionary xpath=/test-tree/branch[@name='Left']/nest
+ ${params}= Create Dictionary xpath=/test-tree/branch[@name='LEFT/left']/nest
${headers}= Create Dictionary Authorization=${auth}
${response}= Get On Session CPS_URL ${uri} params=${params} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()['tree:nest']}
- Should Be Equal As Strings ${responseJson['name']} Small
+ Should Be Equal As Strings ${responseJson['name']} SMALL/small