Lines Matching refs:test_ctx

52     struct sysdb_test_ctx *test_ctx;
64 test_ctx = talloc_zero(global_talloc_context, struct sysdb_test_ctx);
65 assert_non_null(test_ctx);
70 test_ctx->ev = tevent_context_init(test_ctx);
71 assert_non_null(test_ctx->ev);
73 conf_db = talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, TEST_CONF_FILE);
78 ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
82 ret = confdb_add_param(test_ctx->confdb, true,
87 ret = confdb_add_param(test_ctx->confdb, true,
92 ret = confdb_add_param(test_ctx->confdb, true,
97 ret = confdb_add_param(test_ctx->confdb, true,
101 ret = sssd_domain_init(test_ctx, test_ctx->confdb, "local",
102 TESTS_PATH, &test_ctx->domain);
105 test_ctx->domain->has_views = true;
106 test_ctx->sysdb = test_ctx->domain->sysdb;
108 *ctx = test_ctx;
117 struct sysdb_test_ctx *test_ctx;
121 ret = setup_sysdb_tests(&test_ctx);
124 test_ctx->domain->mpg = false;
127 test_ctx->opts = talloc_zero(test_ctx, struct sdap_options);
128 assert_non_null(test_ctx->opts);
130 ret = sdap_copy_map(test_ctx->opts, rfc2307_user_map,
131 SDAP_OPTS_USER, &test_ctx->opts->user_map);
134 ret = dp_copy_defaults(test_ctx->opts, default_basic_opts,
135 SDAP_OPTS_BASIC, &test_ctx->opts->basic);
138 dp_opt_set_int(test_ctx->opts->basic, SDAP_ACCOUNT_CACHE_EXPIRATION, 1);
140 *state = (void *) test_ctx;
146 struct sysdb_test_ctx *test_ctx = talloc_get_type_abort(*state,
149 talloc_free(test_ctx);
194 struct sysdb_test_ctx *test_ctx = talloc_get_type_abort(*state,
197 special_grp = sss_create_internal_fqname(test_ctx,
199 test_ctx->domain->name);
202 empty_special_grp = sss_create_internal_fqname(test_ctx,
204 test_ctx->domain->name);
207 empty_grp = sss_create_internal_fqname(test_ctx, "empty_grp",
208 test_ctx->domain->name);
211 grp = sss_create_internal_fqname(test_ctx, "grp", test_ctx->domain->name);
214 test_user = sss_create_internal_fqname(test_ctx, "test_user",
215 test_ctx->domain->name);
217 test_user2 = sss_create_internal_fqname(test_ctx, "test_user2",
218 test_ctx->domain->name);
221 ret = sysdb_store_group(test_ctx->domain, special_grp,
225 ret = sysdb_store_group(test_ctx->domain, empty_special_grp,
229 ret = sysdb_store_group(test_ctx->domain, grp,
233 ret = sysdb_store_group(test_ctx->domain, empty_grp,
237 ret = sysdb_store_user(test_ctx->domain, test_user, NULL,
243 ret = sysdb_store_user(test_ctx->domain, test_user2, NULL,
249 sdom.dom = test_ctx->domain;
252 ret = ldap_id_cleanup(test_ctx->opts, &sdom);
255 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
259 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
263 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
267 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
272 invalidate_group(test_ctx, test_ctx->domain, special_grp);
273 invalidate_group(test_ctx, test_ctx->domain, empty_special_grp);
274 invalidate_group(test_ctx, test_ctx->domain, grp);
275 invalidate_group(test_ctx, test_ctx->domain, empty_grp);
277 ret = ldap_id_cleanup(test_ctx->opts, &sdom);
280 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
284 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
288 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,
292 ret = sysdb_search_group_by_name(test_ctx, test_ctx->domain,