]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dict-extra: test-dict-fs: Initialize dict_op_settings for dict operations
authorSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Thu, 1 Jul 2021 19:39:41 +0000 (20:39 +0100)
committerSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Thu, 1 Jul 2021 19:39:41 +0000 (20:39 +0100)
src/lib-dict-extra/test-dict-fs.c

index e51a267710edcc695c6765d9b704d79b70fba472..325fb8cacb3c00da3b0ea25a258d4451aca2f537 100644 (file)
@@ -9,11 +9,14 @@ static void test_dict_set_get(struct dict *dict, const char *key,
                             const char *value)
 {
        const char *got_value, *error;
-       struct dict_transaction_context *t = dict_transaction_begin(dict, NULL);
+       struct dict_op_settings set = {
+               .username = "testuser",
+       };
+       struct dict_transaction_context *t = dict_transaction_begin(dict, &set);
        dict_set(t, key, value);
        if (dict_transaction_commit(&t, &error) < 0)
                i_fatal("dict_transaction_commit(%s) failed: %s", key, error);
-       if (dict_lookup(dict, NULL, pool_datastack_create(), key, &got_value,
+       if (dict_lookup(dict, &set, pool_datastack_create(), key, &got_value,
                        &error) < 0)
                i_fatal("dict_lookup(%s) failed: %s", key, error);
        test_assert_strcmp(got_value, value);