Change DatastoreAccess::Tree typedef
Before this, the order of items we get in DatastoreAccess::getItems
wasn't preserved. Because (leaf)lists can be ordered, we need to
preserver the order.
Change-Id: Ie4914025b7d868fd9cbbea5e4f1498115030d126
diff --git a/tests/datastore_access.cpp b/tests/datastore_access.cpp
index e11eec5..07320c9 100644
--- a/tests/datastore_access.cpp
+++ b/tests/datastore_access.cpp
@@ -202,7 +202,7 @@
datastore.commitChanges();
}
- DatastoreAccess::Tree expected{{"/example-schema:down", bool{false}},
+ DatastoreAccess::Tree expected{
// Sysrepo always returns containers when getting values, but
// libnetconf does not. This is fine by the YANG standard:
// https://tools.ietf.org/html/rfc7950#section-7.5.7 Furthermore,
@@ -212,10 +212,11 @@
// because it'll use the same data structure as libnetconf, so the
// results will be consistent.
#ifdef sysrepo_BACKEND
- {"/example-schema:lol", special_{SpecialValue::Container}},
{"/example-schema:inventory", special_{SpecialValue::Container}},
+ {"/example-schema:lol", special_{SpecialValue::Container}},
#endif
- {"/example-schema:up", bool{true}}};
+ {"/example-schema:up", bool{true}},
+ {"/example-schema:down", bool{false}}};
REQUIRE(datastore.getItems("/example-schema:*") == expected);
}