Lines Matching defs:service
53 struct fo_service *service;
107 struct fo_service *service;
122 ret = fo_new_service(ctx->fo_ctx, "service_3", NULL, &service);
129 ret = fo_get_service(ctx->fo_ctx, buf, &service);
131 fail_if(service != services[i]);
132 talloc_free(service);
135 ret = fo_get_service(ctx->fo_ctx, buf, &service);
188 active_server = fo_get_active_server(task->service);
199 _get_request(struct test_ctx *test_ctx, struct fo_service *service,
215 task->service = service;
220 test_ctx->fo_ctx, service);
230 struct fo_service *service[3];
235 /* Add service. */
236 fail_if(fo_new_service(ctx->fo_ctx, "http", NULL, &service[0]) != EOK);
238 fail_if(fo_new_service(ctx->fo_ctx, "ldap", NULL, &service[1]) != EOK);
240 fail_if(fo_new_service(ctx->fo_ctx, "ntp", NULL, &service[2]) != EOK);
243 fail_if(fo_add_server(service[0], "localhost", 20, NULL, true) != EOK);
244 fail_if(fo_add_server(service[0], "127.0.0.1", 80, NULL, false) != EOK);
246 fail_if(fo_add_server(service[1], "localhost", 30, NULL, false) != EOK);
247 fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL, true) != EOK);
248 fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL, true) != EEXIST);
249 fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL, false) != EEXIST);
251 fail_if(fo_add_server(service[2], NULL, 123, NULL, true) != EOK);
254 get_request(ctx, service[0], EOK, 20, PORT_WORKING, -1);
255 get_request(ctx, service[0], EOK, 20, PORT_WORKING, SERVER_WORKING);
256 get_request(ctx, service[0], EOK, 20, -1, SERVER_NOT_WORKING);
257 get_request(ctx, service[0], EOK, 80, PORT_WORKING, -1);
258 get_request(ctx, service[0], EOK, 80, PORT_NOT_WORKING, -1);
259 get_request(ctx, service[0], ENOENT, 0, -1, -1);
261 get_request(ctx, service[1], EOK, 389, PORT_WORKING, -1);
262 get_request(ctx, service[1], EOK, 389, -1, SERVER_NOT_WORKING);
263 get_request(ctx, service[1], ENOENT, 0, -1, -1);
265 get_request(ctx, service[2], EOK, 123, -1, -1);