diff options
author | Daniel Salzman <daniel.salzman@nic.cz> | 2019-02-27 13:40:39 +0100 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2019-02-27 13:40:57 +0100 |
commit | f0a889bf29cb57c3df49bebdb7d41a5522953fd2 (patch) | |
tree | 3f6a8aa44b4f6bd89f37e53f148d833b3295083d | |
parent | configure: change order of commands to fix operation of KNOT_LIB_VERSION (diff) | |
download | knot-f0a889bf29cb57c3df49bebdb7d41a5522953fd2.tar.xz knot-f0a889bf29cb57c3df49bebdb7d41a5522953fd2.zip |
tests/kasp_db: take important code out of assertion
-rw-r--r-- | tests/knot/test_kasp_db.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/knot/test_kasp_db.c b/tests/knot/test_kasp_db.c index 53065ae0f..3d8b3573e 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 <https://www.gnu.org/licenses/>. */ -#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdio.h> @@ -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"); |