From: Daniel Salzman Date: Wed, 27 Feb 2019 12:40:39 +0000 (+0100) Subject: tests/kasp_db: take important code out of assertion X-Git-Tag: v2.8.0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0a889bf29cb57c3df49bebdb7d41a5522953fd2;p=thirdparty%2Fknot-dns.git tests/kasp_db: take important code out of assertion --- diff --git a/tests/knot/test_kasp_db.c b/tests/knot/test_kasp_db.c index 53065ae0f6..3d8b3573ee 100644 --- a/tests/knot/test_kasp_db.c +++ b/tests/knot/test_kasp_db.c @@ -14,7 +14,6 @@ along with this program. If not, see . */ -#include #include #include #include @@ -82,7 +81,7 @@ int main(int argc, char *argv[]) char *test_dir_name = test_mkdtemp(); bool ignore = false; - + list_t l; key_params_t *params; #define free_params free(params->id); free(params->public_key.data); params->id = NULL; params->public_key.data = NULL; @@ -182,8 +181,10 @@ int main(int argc, char *argv[]) is_int(0, knot_dname_cmp(((ptrnode_t *)HEAD(l))->d, zone1) | knot_dname_cmp(((ptrnode_t *)TAIL(l))->d, zone2), "kasp_db: listed correct zones"); ptrlist_deep_free(&l, NULL); - assert(kasp_db_add_key(db, zone1, ¶ms1) == KNOT_EOK); - assert(kasp_db_add_key(db, zone2, ¶ms2) == KNOT_EOK); + ret = kasp_db_add_key(db, zone1, ¶ms1); + ok(ret == KNOT_EOK, "kasp_db: add key1"); + ret = kasp_db_add_key(db, zone2, ¶ms2); + ok(ret == KNOT_EOK, "kasp_db: add key2"); ret = kasp_db_set_policy_last(db, "policy1", NULL, zone1, params1.id); is_int(KNOT_EOK, ret, "kasp_db: set policylast");