]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: added pktcache
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 9 May 2015 19:48:49 +0000 (21:48 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 9 May 2015 19:51:07 +0000 (21:51 +0200)
tests/test_integration.c

index 2ccc50d3853ef6a8e8dce30b2bb76304aff8e3c7..e1bb42f018c94dcf2453b3eaa6afe54f6a6c5c98 100644 (file)
@@ -52,13 +52,14 @@ static PyObject* init(PyObject* self, PyObject* args)
 
        /* Load basic modules. */
        array_init(global_modules);
-       int ret = array_reserve(global_modules, 2);
+       int ret = array_reserve(global_modules, 3);
        if (ret < 0) {
                return NULL;
        }
        kr_module_load(&global_modules.at[0], "iterate", NULL);
        kr_module_load(&global_modules.at[1], "rrcache", NULL);
-       global_modules.len = 2;
+       kr_module_load(&global_modules.at[2], "pktcache", NULL);
+       global_modules.len = 3;
 
        /* Initialize resolution context */
        mm_ctx_init(&global_mm);
@@ -72,6 +73,7 @@ static PyObject* init(PyObject* self, PyObject* args)
        memset(&opts, 0, sizeof(opts));
        opts.path = global_tmpdir;
        opts.mapsize = 100 * 4096;
+       kr_cache_storage_set(namedb_lmdb_api);
        global_context.cache = kr_cache_open(&opts, &global_mm);
        assert(global_context.cache);