Commit 9f58cba7 authored by Francis Dupont's avatar Francis Dupont

[65-libyang-testutils] Final fixes

parent 135a80a7
......@@ -108,7 +108,7 @@ int main() {
int exit_code = 0;
if (!found_test ||
if (!found_test ||
!found_ietf_types || !found_yang_types ||
!found_ietf || !found_kea4 || !found_kea6 || !found_keaca ||
!found_kea2) {
......
......@@ -154,7 +154,7 @@ TEST(TranslatorBasicTest, getItem) {
S_Val s_val;
EXPECT_NO_THROW(sess->set_item(xpath.c_str(), s_val));
ConstElementPtr elem;
EXPECT_NO_THROW(elem = t_obj->getItem("/keatest-module:containe"));
EXPECT_NO_THROW(elem = t_obj->getItem("/keatest-module:container"));
EXPECT_FALSE(elem);
elem.reset();
......@@ -452,7 +452,7 @@ TEST(TranslatorBasicTest, setItem) {
ASSERT_NO_THROW(t_obj.reset(new TranslatorBasic(sess)));
// Container.
string xpath = "/keatest-module:containe";
string xpath = "/keatest-module:container";
ConstElementPtr elem = Element::createMap();
EXPECT_THROW(t_obj->setItem(xpath, elem, SR_CONTAINER_T), NotImplemented);
EXPECT_THROW(t_obj->setItem(xpath, elem, SR_CONTAINER_PRESENCE_T),
......
......@@ -150,17 +150,17 @@ TEST(YangReprTrest, getTestErrors) {
// Change a path.
YRTree badpath = testTree;
badpath[20].xpath_ = "/keatest-module:kernel-module"; // removed final 's'
badpath[22].xpath_ = "/keatest-module:kernel-module"; // removed final 's'
EXPECT_FALSE(repr.verify(badpath, sess, cerr));
// Change a value.
YRTree badvalue = testTree;
badvalue[1].value_ = "Str"; // was "str"
badvalue[3].value_ = "Str"; // was "str"
EXPECT_FALSE(repr.verify(badvalue, sess, cerr));
// Change a type.
YRTree badtype = testTree;
badtype[8].type_ = SR_UINT32_T; // was SR_INT32_T
badtype[10].type_ = SR_UINT32_T; // was SR_INT32_T
EXPECT_FALSE(repr.verify(badtype, sess, cerr));
// Add a record at the end.
......
......@@ -123,18 +123,11 @@ To install the test module, issue the following command:
sudo sysrepoctl --install --yang=src/lib/yang/tests/keatest-module.yang
@endverbatim
To install the example module, issue the following command:
@verbatim
sudo sysrepoctl --install --yang=src/lib/yang/tests/keaexample-module.yang
@endverbatim
To verify that you have the schemas installed, do this:
@verbatim
sysrepoctl -l
@endverbatim
Make sure that keatest-module, keaexample-module and other necessary
modules are on the list.
Make sure that keatest-module and other necessary modules are on the list.
Note as DHCP modules are still being developed it can be useful to
deinstall them before reinstalling a more recent version:
......@@ -143,7 +136,7 @@ sudo sysrepoctl --uninstall --module=<module-name>
@endverbatim
Tests use these modules you can find in src/lib/yang/models in addition
of keatest-module and keaexample-module:
of keatest-module:
- ietf-dhcpv6-server
- kea-ctrl-agent
- kea-dhcp-ddns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment