Lines Matching defs:ts
101 struct test_state *ts;
103 ts = talloc(NULL, struct test_state);
104 assert_non_null(ts);
106 ret = sss_ncache_init(ts, SHORTSPAN, 0, &ts->ctx);
108 assert_non_null(ts->ctx);
110 *state = (void *)ts;
116 struct test_state *ts = talloc_get_type_abort(*state, struct test_state);
117 talloc_free(ts);
146 struct test_state *ts;
150 ts = talloc_get_type_abort(*state, struct test_state);
153 ret = sss_ncache_check_uid(ts->ctx, NULL, uid);
159 ret = sss_ncache_reset_permanent(ts->ctx);
162 ret = sss_ncache_set_uid(ts->ctx, permanent, NULL, uid);
165 ret = sss_ncache_check_uid(ts->ctx, NULL, uid);
168 ret = sss_ncache_set_uid(ts->ctx, permanent, NULL, uid);
171 ret = sss_ncache_check_uid(ts->ctx, NULL, uid);
176 ret = sss_ncache_check_uid(ts->ctx, NULL, uid);
181 ret = sss_ncache_set_uid(ts->ctx, permanent, NULL, uid);
184 ret = sss_ncache_check_uid(ts->ctx, NULL, uid);
189 ret = sss_ncache_check_uid(ts->ctx, NULL, uid);
192 ret = sss_ncache_set_uid(ts->ctx, permanent, NULL, uid);
205 struct test_state *ts;
208 ts = talloc_get_type_abort(*state, struct test_state);
211 ret = sss_ncache_check_gid(ts->ctx, NULL, gid);
216 ret = sss_ncache_set_gid(ts->ctx, permanent, NULL, gid);
219 ret = sss_ncache_check_gid(ts->ctx, NULL, gid);
223 ret = sss_ncache_set_gid(ts->ctx, permanent, NULL, gid);
226 ret = sss_ncache_check_gid(ts->ctx, NULL, gid);
240 struct test_state *ts;
243 ts = talloc_get_type_abort(*state, struct test_state);
246 ret = sss_ncache_check_sid(ts->ctx, sid);
251 ret = sss_ncache_set_sid(ts->ctx, permanent, sid);
254 ret = sss_ncache_check_sid(ts->ctx, sid);
258 ret = sss_ncache_set_sid(ts->ctx, permanent, sid);
261 ret = sss_ncache_check_sid(ts->ctx, sid);
274 struct test_state *ts;
277 ts = talloc_get_type_abort(*state, struct test_state);
280 ret = sss_ncache_check_cert(ts->ctx, cert);
285 ret = sss_ncache_set_cert(ts->ctx, permanent, cert);
288 ret = sss_ncache_check_cert(ts->ctx, cert);
292 ret = sss_ncache_set_cert(ts->ctx, permanent, cert);
295 ret = sss_ncache_check_cert(ts->ctx, cert);
308 struct test_state *ts;
311 ts = talloc_get_type_abort(*state, struct test_state);
312 dom = talloc(ts, struct sss_domain_info);
315 name = sss_create_internal_fqname(ts, NAME, dom->name);
320 ret = sss_ncache_check_user(ts->ctx, dom, name);
324 ret = sss_ncache_check_user(ts->ctx, dom, name);
329 ret = sss_ncache_set_user(ts->ctx, permanent, dom, name);
332 ret = sss_ncache_check_user(ts->ctx, dom, name);
336 ret = sss_ncache_set_user(ts->ctx, permanent, dom, name);
339 ret = sss_ncache_check_user(ts->ctx, dom, name);
354 struct test_state *ts;
357 ts = talloc_get_type_abort(*state, struct test_state);
358 dom = talloc(ts, struct sss_domain_info);
361 name = sss_create_internal_fqname(ts, NAME, dom->name);
366 ret = sss_ncache_check_group(ts->ctx, dom, name);
370 ret = sss_ncache_check_group(ts->ctx, dom, name);
375 ret = sss_ncache_set_group(ts->ctx, permanent, dom, name);
378 ret = sss_ncache_check_group(ts->ctx, dom, name);
382 ret = sss_ncache_set_group(ts->ctx, permanent, dom, name);
385 ret = sss_ncache_check_group(ts->ctx, dom, name);
400 struct test_state *ts;
403 ts = talloc_get_type_abort(*state, struct test_state);
404 dom = talloc(ts, struct sss_domain_info);
409 ret = sss_ncache_check_netgr(ts->ctx, dom, name);
413 ret = sss_ncache_check_netgr(ts->ctx, dom, name);
418 ret = sss_ncache_set_netgr(ts->ctx, permanent, dom, name);
421 ret = sss_ncache_check_netgr(ts->ctx, dom, name);
425 ret = sss_ncache_set_netgr(ts->ctx, permanent, dom, name);
428 ret = sss_ncache_check_netgr(ts->ctx, dom, name);
441 struct test_state *ts;
444 ts = talloc_get_type_abort(*state, struct test_state);
445 dom = talloc(ts, struct sss_domain_info);
450 ret = sss_ncache_check_service(ts->ctx, dom, name, PROTO);
454 ret = sss_ncache_check_service(ts->ctx, dom, name, PROTO);
459 ret = sss_ncache_set_service_name(ts->ctx, permanent, dom, name, PROTO);
462 ret = sss_ncache_check_service(ts->ctx, dom, name, PROTO);
466 ret = sss_ncache_set_service_name(ts->ctx, permanent, dom, name, PROTO);
469 ret = sss_ncache_check_service(ts->ctx, dom, name, PROTO);
481 struct test_state *ts;
484 ts = talloc_get_type_abort(*state, struct test_state);
485 dom = talloc(ts, struct sss_domain_info);
490 ret = sss_ncache_check_service_port(ts->ctx, dom, (uint16_t)PORT,
495 ret = sss_ncache_check_service_port(ts->ctx, dom, (uint16_t)PORT,
501 ret = sss_ncache_set_service_port(ts->ctx, permanent, dom, (uint16_t)PORT,
505 ret = sss_ncache_check_service_port(ts->ctx, dom, (uint16_t)PORT,
510 ret = sss_ncache_set_service_port(ts->ctx, permanent, dom, (uint16_t)PORT,
514 ret = sss_ncache_check_service_port(ts->ctx, dom, (uint16_t)PORT,
523 struct test_state *ts;
526 ts = talloc_get_type_abort(*state, struct test_state);
528 ret = sss_ncache_set_uid(ts->ctx, permanent, NULL, 0);
531 ret = sss_ncache_check_uid(ts->ctx, NULL, 0);
534 ret = sss_ncache_reset_permanent(ts->ctx);
537 ret = sss_ncache_check_uid(ts->ctx, NULL, 0);
588 struct test_state *ts;
600 ts = talloc_get_type_abort(*state, struct test_state);
602 ev = tevent_context_init(ts);
605 dom = talloc_zero(ts, struct sss_domain_info);
609 ts->nctx = mock_nctx(ts);
610 assert_non_null(ts->nctx);
612 tc = create_dom_test_ctx(ts, TESTS_PATH, TEST_CONF_DB,
616 ncache = ts->ctx;
617 ts->rctx = mock_rctx(ts, ev, dom, ts->nctx);
618 assert_non_null(ts->rctx);
620 ret = sss_names_init(ts, tc->confdb, TEST_DOM_NAME, &dom->names);
623 ret = sss_ncache_prepopulate(ncache, tc->confdb, ts->rctx);
668 struct test_state *ts;
680 ts = talloc_get_type_abort(*state, struct test_state);
682 ev = tevent_context_init(ts);
685 dom = talloc_zero(ts, struct sss_domain_info);
689 ts->nctx = mock_nctx(ts);
690 assert_non_null(ts->nctx);
692 tc = create_dom_test_ctx(ts, TESTS_PATH, TEST_CONF_DB,
696 ncache = ts->ctx;
697 ts->rctx = mock_rctx(ts, ev, dom, ts->nctx);
698 assert_non_null(ts->rctx);
699 ts->rctx->default_domain = discard_const(TEST_DOM_NAME);
701 ret = sss_names_init(ts, tc->confdb, TEST_DOM_NAME, &dom->names);
704 ret = sss_ncache_prepopulate(ncache, tc->confdb, ts->rctx);
730 struct test_state *ts;
746 ts = talloc_get_type_abort(*state, struct test_state);
748 ev = tevent_context_init(ts);
751 dom = talloc_zero(ts, struct sss_domain_info);
755 ts->nctx = mock_nctx(ts);
756 assert_non_null(ts->nctx);
758 tc = create_dom_test_ctx(ts, TESTS_PATH, TEST_CONF_DB,
770 ncache = ts->ctx;
771 ts->rctx = mock_rctx(ts, ev, dom, ts->nctx);
772 assert_non_null(ts->rctx);
773 ts->rctx->default_domain = discard_const(TEST_DOM_NAME);
774 ts->rctx->cdb = tc->confdb;
776 ret = sss_names_init(ts, tc->confdb, TEST_DOM_NAME, &dom->names);
779 ret = sss_ncache_reset_repopulate_permanent(ts->rctx, ncache);
783 dom2 = talloc_zero(ts, struct sss_domain_info);
802 ret = sss_ncache_reset_repopulate_permanent(ts->rctx, ncache);
822 struct test_state *ts;
825 ts = talloc_get_type_abort(*state, struct test_state);
826 dom = talloc(ts, struct sss_domain_info);
833 ret = sss_ncache_check_uid(ts->ctx, NULL, 123);
835 ret = sss_ncache_set_uid(ts->ctx, false, NULL, 123);
837 ret = sss_ncache_check_uid(ts->ctx, NULL, 123);
840 ret = sss_ncache_check_user(ts->ctx, dom, "foo");
842 ret = sss_ncache_set_user(ts->ctx, false, dom, "foo");
844 ret = sss_ncache_check_user(ts->ctx, dom, "foo");
848 ret = sss_ncache_check_gid(ts->ctx, NULL, 456);
850 ret = sss_ncache_set_gid(ts->ctx, false, NULL, 456);
852 ret = sss_ncache_check_gid(ts->ctx, NULL, 456);
855 ret = sss_ncache_check_group(ts->ctx, dom, "bar");
857 ret = sss_ncache_set_group(ts->ctx, false, dom, "bar");
859 ret = sss_ncache_check_group(ts->ctx, dom, "bar");
862 ret = sss_ncache_reset_users(ts->ctx);
866 ret = sss_ncache_check_user(ts->ctx, dom, "foo");
868 ret = sss_ncache_check_uid(ts->ctx, NULL, 123);
872 ret = sss_ncache_check_gid(ts->ctx, NULL, 456);
874 ret = sss_ncache_check_group(ts->ctx, dom, "bar");
877 ret = sss_ncache_reset_groups(ts->ctx);
880 ret = sss_ncache_check_gid(ts->ctx, NULL, 456);
882 ret = sss_ncache_check_group(ts->ctx, dom, "bar");
891 struct test_state *ts;
895 ts = talloc_get_type_abort(*state, struct test_state);
900 dom = talloc(ts, struct sss_domain_info);
904 dom2 = talloc(ts, struct sss_domain_info);
908 ret = sss_ncache_check_locate_gid(ts->ctx, dom, gid);
910 ret = sss_ncache_check_locate_uid(ts->ctx, dom, uid);
913 ret = sss_ncache_set_locate_gid(ts->ctx, dom, gid);
915 ret = sss_ncache_set_locate_uid(ts->ctx, dom, uid);
918 ret = sss_ncache_check_locate_gid(ts->ctx, dom, gid);
920 ret = sss_ncache_check_locate_uid(ts->ctx, dom, uid);
923 ret = sss_ncache_check_locate_gid(ts->ctx, dom2, gid);
925 ret = sss_ncache_check_locate_uid(ts->ctx, dom2, uid);
932 struct test_state *ts;
936 ts = talloc_get_type_abort(*state, struct test_state);
938 dom = talloc(ts, struct sss_domain_info);
942 dom2 = talloc(ts, struct sss_domain_info);
946 ret = sss_ncache_check_domain_locate_type(ts->ctx, dom, "foo");
948 ret = sss_ncache_set_domain_locate_type(ts->ctx, dom, "foo");
950 ret = sss_ncache_check_domain_locate_type(ts->ctx, dom, "foo");
953 ret = sss_ncache_check_domain_locate_type(ts->ctx, dom2, "foo");