Lines Matching refs:data
169 static int test_sysdb_store_ssh_host(struct test_data *data)
174 ret = sysdb_store_ssh_host(data->ctx->domain,
175 data->hostname,
176 data->alias,
177 data->ctx->domain->ssh_host_timeout,
179 data->attrs);
183 static int test_sysdb_delete_ssh_host(struct test_data *data)
187 ret = sysdb_delete_ssh_host(data->ctx->domain, data->hostname);
191 static int test_sysdb_get_ssh_host(struct test_data *data)
196 ret = sysdb_get_ssh_host(data->ctx, data->ctx->domain, data->hostname,
197 attrs, &data->host);
205 struct test_data *data;
214 data = talloc_zero(test_ctx, struct test_data);
215 if (data == NULL) {
221 data->ctx = test_ctx;
222 data->ev = test_ctx->ev;
223 data->hostname = talloc_strdup(test_ctx, TEST_HOSTNAME);
224 if (data->hostname == NULL) {
230 data->attrs = sysdb_new_attrs(test_ctx);
231 if (data->attrs == NULL) {
237 ret = test_sysdb_store_ssh_host(data);
247 struct test_data *data;
256 data = talloc_zero(test_ctx, struct test_data);
257 if (data == NULL) {
262 data->ctx = test_ctx;
263 data->ev = test_ctx->ev;
264 data->hostname = talloc_strdup(test_ctx, TEST_HOSTNAME);
265 if (data->hostname == NULL) {
271 ret = test_sysdb_delete_ssh_host(data);
281 struct test_data *data;
290 data = talloc_zero(test_ctx, struct test_data);
291 if (data == NULL) {
297 data->ctx = test_ctx;
298 data->ev = test_ctx->ev;
299 data->hostname = talloc_strdup(test_ctx, "nonexistent_host");
300 if (data->hostname == NULL) {
306 ret = test_sysdb_delete_ssh_host(data);
317 struct test_data *data;
326 data = talloc_zero(test_ctx, struct test_data);
327 if (data == NULL) {
333 data->ctx = test_ctx;
334 data->ev = test_ctx->ev;
335 data->hostname = talloc_strdup(test_ctx, TEST_HOSTNAME);
336 if (data->hostname == NULL) {
342 data->attrs = sysdb_new_attrs(test_ctx);
343 if (data->attrs == NULL) {
349 ret = test_sysdb_store_ssh_host(data);
356 ret = test_sysdb_get_ssh_host(data);