summaryrefslogtreecommitdiff
path: root/tests/lib/northbound/test_oper_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/northbound/test_oper_data.c')
-rw-r--r--tests/lib/northbound/test_oper_data.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c
index 0b334c6522..a38325173a 100644
--- a/tests/lib/northbound/test_oper_data.c
+++ b/tests/lib/northbound/test_oper_data.c
@@ -236,13 +236,9 @@ static int frr_test_module_vrfs_vrf_ping(struct nb_cb_rpc_args *args)
return NB_OK;
}
-/*
- * XPath: /frr-test-module:frr-test-module/c1value
- */
-static struct yang_data *
-frr_test_module_c1value_get_elem(struct nb_cb_get_elem_args *args)
+static struct yang_data *__return_null(struct nb_cb_get_elem_args *args)
{
- return yang_data_new_uint8(args->xpath, 21);
+ return NULL;
}
/*
@@ -263,6 +259,14 @@ static enum nb_error frr_test_module_c2cont_c2value_get(const struct nb_node *nb
return NB_OK;
}
+/*
+ * XPath: /frr-test-module:frr-test-module/c3value
+ */
+static struct yang_data *frr_test_module_c3value_get_elem(struct nb_cb_get_elem_args *args)
+{
+ return yang_data_new_uint8(args->xpath, 21);
+}
+
/* clang-format off */
const struct frr_yang_module_info frr_test_module_info = {
.name = "frr-test-module",
@@ -316,13 +320,21 @@ const struct frr_yang_module_info frr_test_module_info = {
},
{
.xpath = "/frr-test-module:frr-test-module/c1value",
- .cbs.get_elem = frr_test_module_c1value_get_elem,
+ .cbs.get_elem = __return_null,
},
{
.xpath = "/frr-test-module:frr-test-module/c2cont/c2value",
.cbs.get = frr_test_module_c2cont_c2value_get,
},
{
+ .xpath = "/frr-test-module:frr-test-module/c3value",
+ .cbs.get_elem = frr_test_module_c3value_get_elem,
+ },
+ {
+ .xpath = "/frr-test-module:frr-test-module/c4cont/c4value",
+ .cbs.get_elem = __return_null,
+ },
+ {
.xpath = NULL,
},
}