~ubuntu-branches/ubuntu/utopic/dovecot/utopic-proposed

« back to all changes in this revision

Viewing changes to src/doveadm/dsync/test-dsync-proxy-server-cmd.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (4.1.35 sid)
  • Revision ID: package-import@ubuntu.com-20140108093549-i72o93pux8p0dlaf
Tags: 1:2.2.9-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2009-2012 Dovecot authors, see the included COPYING file */
2
 
 
3
 
#include "lib.h"
4
 
#include "array.h"
5
 
#include "str.h"
6
 
#include "strescape.h"
7
 
#include "istream.h"
8
 
#include "ostream.h"
9
 
#include "test-common.h"
10
 
#include "dsync-proxy-server.h"
11
 
#include "test-dsync-worker.h"
12
 
#include "test-dsync-common.h"
13
 
 
14
 
#define ALL_MAIL_FLAGS "\\Answered \\Flagged \\Deleted \\Seen \\Draft \\Recent"
15
 
 
16
 
struct master_service *master_service;
17
 
static string_t *out;
18
 
static struct dsync_proxy_server *server;
19
 
static struct test_dsync_worker *test_worker;
20
 
static struct dsync_proxy_server_command *cur_cmd;
21
 
static const char *cur_cmd_args[20];
22
 
 
23
 
static void out_clear(void)
24
 
{
25
 
        o_stream_seek(server->output, 0);
26
 
        str_truncate(out, 0);
27
 
}
28
 
 
29
 
static int run_more(void)
30
 
{
31
 
        int ret;
32
 
 
33
 
        i_assert(cur_cmd != NULL);
34
 
 
35
 
        ret = cur_cmd->func(server, cur_cmd_args);
36
 
        if (ret == 0)
37
 
                return 0;
38
 
 
39
 
        cur_cmd = NULL;
40
 
        return ret;
41
 
}
42
 
 
43
 
static int ATTR_SENTINEL
44
 
run_cmd(const char *cmd_name, ...)
45
 
{
46
 
        va_list va;
47
 
        const char *str;
48
 
        unsigned int i = 0;
49
 
 
50
 
        i_assert(cur_cmd == NULL);
51
 
 
52
 
        va_start(va, cmd_name);
53
 
        while ((str = va_arg(va, const char *)) != NULL) {
54
 
                i_assert(i < N_ELEMENTS(cur_cmd_args)+1);
55
 
                cur_cmd_args[i++] = str;
56
 
        }
57
 
        cur_cmd_args[i] = NULL;
58
 
        va_end(va);
59
 
 
60
 
        cur_cmd = dsync_proxy_server_command_find(cmd_name);
61
 
        i_assert(cur_cmd != NULL);
62
 
        return run_more();
63
 
}
64
 
 
65
 
static void test_dsync_proxy_box_list(void)
66
 
{
67
 
        struct dsync_mailbox box;
68
 
 
69
 
        test_begin("proxy server box list");
70
 
 
71
 
        test_assert(run_cmd("BOX-LIST", NULL) == 0);
72
 
 
73
 
        /* \noselect mailbox */
74
 
        memset(&box, 0, sizeof(box));
75
 
        box.name = "\t\001\r\nname\t\001\n\r";
76
 
        box.name_sep = '/';
77
 
        box.last_change = 992;
78
 
        box.flags = DSYNC_MAILBOX_FLAG_NOSELECT;
79
 
        test_worker->box_iter.next_box = &box;
80
 
        test_assert(run_more() == 0);
81
 
        test_assert(strcmp(str_c(out), t_strconcat(str_tabescape(box.name),
82
 
                "\t/\t992\t1\n", NULL)) == 0);
83
 
        out_clear();
84
 
 
85
 
        /* selectable mailbox */
86
 
        memset(&box, 0, sizeof(box));
87
 
        box.name = "foo/bar";
88
 
        box.name_sep = '/';
89
 
        memcpy(box.mailbox_guid.guid, test_mailbox_guid1, GUID_128_SIZE);
90
 
        box.uid_validity = 4275878552;
91
 
        box.uid_next = 4023233417;
92
 
        box.message_count = 4525;
93
 
        box.highest_modseq = 18080787909545915012ULL;
94
 
        box.first_recent_uid = 353;
95
 
        test_worker->box_iter.next_box = &box;
96
 
 
97
 
        test_assert(run_more() == 0);
98
 
 
99
 
        test_assert(strcmp(str_c(out), "foo/bar\t/\t0\t0\t"
100
 
                           TEST_MAILBOX_GUID1"\t"
101
 
                           "4275878552\t"
102
 
                           "4023233417\t"
103
 
                           "4525\t"
104
 
                           "18080787909545915012\t"
105
 
                           "353\n") == 0);
106
 
        out_clear();
107
 
 
108
 
        /* last mailbox */
109
 
        test_worker->box_iter.last = TRUE;
110
 
        test_assert(run_more() == 1);
111
 
        test_assert(strcmp(str_c(out), "+\n") == 0);
112
 
        out_clear();
113
 
 
114
 
        test_end();
115
 
}
116
 
 
117
 
static void test_dsync_proxy_subs_list(void)
118
 
{
119
 
        const char *name;
120
 
        struct dsync_worker_subscription subs;
121
 
        struct dsync_worker_unsubscription unsubs;
122
 
 
123
 
        test_begin("proxy server subs list");
124
 
 
125
 
        test_assert(run_cmd("SUBS-LIST", NULL) == 0);
126
 
 
127
 
        /* subscription */
128
 
        name = "\t\001\r\nname\t\001\n\r";
129
 
        subs.vname = name;
130
 
        subs.storage_name = "\tstorage_name\n";
131
 
        subs.last_change = 1234567890;
132
 
        subs.ns_prefix = "\t\001\r\nprefix\t\001\n\r";
133
 
        test_worker->subs_iter.next_subscription = &subs;
134
 
        test_assert(run_more() == 0);
135
 
        test_assert(strcmp(str_c(out), t_strconcat(
136
 
                str_tabescape(name), "\t",
137
 
                str_tabescape(subs.storage_name), "\t",
138
 
                str_tabescape(subs.ns_prefix),
139
 
                "\t1234567890\n", NULL)) == 0);
140
 
        out_clear();
141
 
 
142
 
        test_worker->subs_iter.last_subs = TRUE;
143
 
        test_assert(run_more() == 0);
144
 
        test_assert(strcmp(str_c(out), "+\n") == 0);
145
 
        out_clear();
146
 
 
147
 
        /* unsubscription */
148
 
        memcpy(unsubs.name_sha1.guid, test_mailbox_guid1,
149
 
               sizeof(unsubs.name_sha1.guid));
150
 
        unsubs.ns_prefix = "\t\001\r\nprefix2\t\001\n\r";
151
 
        unsubs.last_change = 987654321;
152
 
        test_worker->subs_iter.next_unsubscription = &unsubs;
153
 
        test_assert(run_more() == 0);
154
 
        test_assert(strcmp(str_c(out), t_strconcat(TEST_MAILBOX_GUID1, "\t",
155
 
                str_tabescape(unsubs.ns_prefix), "\t987654321\n", NULL)) == 0);
156
 
        out_clear();
157
 
 
158
 
        test_worker->subs_iter.last_unsubs = TRUE;
159
 
        test_assert(run_more() == 1);
160
 
        test_assert(strcmp(str_c(out), "+\n") == 0);
161
 
        out_clear();
162
 
 
163
 
        test_end();
164
 
}
165
 
 
166
 
static void test_dsync_proxy_msg_list(void)
167
 
{
168
 
        static const char *test_keywords[] = {
169
 
                "kw1", "kw2", NULL
170
 
        };
171
 
        struct dsync_message msg;
172
 
        struct test_dsync_worker_msg test_msg;
173
 
 
174
 
        test_begin("proxy server msg list");
175
 
 
176
 
        test_assert(run_cmd("MSG-LIST", TEST_MAILBOX_GUID1, TEST_MAILBOX_GUID2, NULL) == 0);
177
 
 
178
 
        memset(&msg, 0, sizeof(msg));
179
 
        msg.guid = "\t\001\r\nguid\t\001\n\r";
180
 
        msg.uid = 123;
181
 
        msg.modseq = 98765432101234;
182
 
        msg.save_date = 1234567890;
183
 
 
184
 
        /* no flags */
185
 
        test_msg.msg = msg;
186
 
        test_msg.mailbox_idx = 98;
187
 
        array_append(&test_worker->msg_iter.msgs, &test_msg, 1);
188
 
        test_assert(run_more() == 0);
189
 
        test_assert(strcmp(str_c(out), t_strconcat(
190
 
                "98\t", str_tabescape(msg.guid),
191
 
                "\t123\t98765432101234\t\t1234567890\n", NULL)) == 0);
192
 
        out_clear();
193
 
 
194
 
        /* all flags, some keywords */
195
 
        msg.modseq = 1;
196
 
        msg.save_date = 2;
197
 
        msg.guid = "guid";
198
 
        msg.flags = MAIL_FLAGS_MASK;
199
 
        msg.keywords = test_keywords;
200
 
        test_msg.msg = msg;
201
 
        test_msg.mailbox_idx = 76;
202
 
        array_append(&test_worker->msg_iter.msgs, &test_msg, 1);
203
 
        test_assert(run_more() == 0);
204
 
        test_assert(strcmp(str_c(out), "76\tguid\t123\t1\t"
205
 
                           ALL_MAIL_FLAGS" kw1 kw2\t2\n") == 0);
206
 
        out_clear();
207
 
 
208
 
        /* last message */
209
 
        test_worker->msg_iter.last = TRUE;
210
 
        test_assert(run_more() == 1);
211
 
        test_assert(strcmp(str_c(out), "+\n") == 0);
212
 
        out_clear();
213
 
 
214
 
        test_end();
215
 
}
216
 
 
217
 
static void test_dsync_proxy_box_create(void)
218
 
{
219
 
        struct test_dsync_box_event event;
220
 
 
221
 
        test_begin("proxy server box create");
222
 
 
223
 
        test_assert(run_cmd("BOX-CREATE", "noselect", "/",
224
 
                            "553", "1", NULL) == 1);
225
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
226
 
        test_assert(event.type == LAST_BOX_TYPE_CREATE);
227
 
        test_assert(strcmp(event.box.name, "noselect") == 0);
228
 
        test_assert(event.box.name_sep == '/');
229
 
        test_assert(event.box.last_change == 553);
230
 
        test_assert(event.box.flags == DSYNC_MAILBOX_FLAG_NOSELECT);
231
 
        test_assert(event.box.uid_validity == 0);
232
 
 
233
 
        test_assert(run_cmd("BOX-CREATE", "selectable", "?",
234
 
                            "61", "2", TEST_MAILBOX_GUID2, "1234567890", "9876",
235
 
                            "4610", "28427847284728", "853", NULL) == 1);
236
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
237
 
        test_assert(event.type == LAST_BOX_TYPE_CREATE);
238
 
        test_assert(strcmp(event.box.name, "selectable") == 0);
239
 
        test_assert(event.box.name_sep == '?');
240
 
        test_assert(memcmp(event.box.mailbox_guid.guid, test_mailbox_guid2, GUID_128_SIZE) == 0);
241
 
        test_assert(event.box.flags == 2);
242
 
        test_assert(event.box.uid_validity == 1234567890);
243
 
        test_assert(event.box.uid_next == 9876);
244
 
        test_assert(event.box.message_count == 4610);
245
 
        test_assert(event.box.highest_modseq == 28427847284728);
246
 
        test_assert(event.box.first_recent_uid == 853);
247
 
        test_assert(event.box.last_change == 61);
248
 
 
249
 
        test_end();
250
 
}
251
 
 
252
 
static void test_dsync_proxy_box_delete(void)
253
 
{
254
 
        struct test_dsync_box_event event;
255
 
 
256
 
        test_begin("proxy server box delete");
257
 
 
258
 
        test_assert(run_cmd("BOX-DELETE", TEST_MAILBOX_GUID1, "4351", NULL) == 1);
259
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
260
 
        test_assert(event.type == LAST_BOX_TYPE_DELETE);
261
 
        test_assert(memcmp(event.box.mailbox_guid.guid, test_mailbox_guid1, GUID_128_SIZE) == 0);
262
 
        test_assert(event.box.last_change == 4351);
263
 
 
264
 
        test_assert(run_cmd("BOX-DELETE", TEST_MAILBOX_GUID2, "653", NULL) == 1);
265
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
266
 
        test_assert(event.type == LAST_BOX_TYPE_DELETE);
267
 
        test_assert(memcmp(event.box.mailbox_guid.guid, test_mailbox_guid2, GUID_128_SIZE) == 0);
268
 
        test_assert(event.box.last_change == 653);
269
 
 
270
 
        test_end();
271
 
}
272
 
 
273
 
static void test_dsync_proxy_box_rename(void)
274
 
{
275
 
        struct test_dsync_box_event event;
276
 
 
277
 
        test_begin("proxy server box rename");
278
 
 
279
 
        test_assert(run_cmd("BOX-RENAME", TEST_MAILBOX_GUID1, "name\t1", "/", NULL) == 1);
280
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
281
 
        test_assert(event.type == LAST_BOX_TYPE_RENAME);
282
 
        test_assert(memcmp(event.box.mailbox_guid.guid, test_mailbox_guid1, GUID_128_SIZE) == 0);
283
 
        test_assert(strcmp(event.box.name, "name\t1") == 0);
284
 
        test_assert(event.box.name_sep == '/');
285
 
 
286
 
        test_assert(run_cmd("BOX-RENAME", TEST_MAILBOX_GUID2, "", "?", NULL) == 1);
287
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
288
 
        test_assert(event.type == LAST_BOX_TYPE_RENAME);
289
 
        test_assert(memcmp(event.box.mailbox_guid.guid, test_mailbox_guid2, GUID_128_SIZE) == 0);
290
 
        test_assert(strcmp(event.box.name, "") == 0);
291
 
        test_assert(event.box.name_sep == '?');
292
 
 
293
 
        test_end();
294
 
}
295
 
 
296
 
static void test_dsync_proxy_box_update(void)
297
 
{
298
 
        struct test_dsync_box_event event;
299
 
 
300
 
        test_begin("proxy server box update");
301
 
 
302
 
        test_assert(run_cmd("BOX-UPDATE", "updated", "/",
303
 
                            "53", "2", TEST_MAILBOX_GUID1, "34343", "22",
304
 
                            "58293", "2238427847284728", "2482", NULL) == 1);
305
 
        test_assert(test_dsync_worker_next_box_event(test_worker, &event));
306
 
        test_assert(event.type == LAST_BOX_TYPE_UPDATE);
307
 
        test_assert(strcmp(event.box.name, "updated") == 0);
308
 
        test_assert(event.box.name_sep == '/');
309
 
        test_assert(memcmp(event.box.mailbox_guid.guid, test_mailbox_guid1, GUID_128_SIZE) == 0);
310
 
        test_assert(event.box.flags == DSYNC_MAILBOX_FLAG_DELETED_MAILBOX);
311
 
        test_assert(event.box.uid_validity == 34343);
312
 
        test_assert(event.box.uid_next == 22);
313
 
        test_assert(event.box.message_count == 58293);
314
 
        test_assert(event.box.highest_modseq == 2238427847284728);
315
 
        test_assert(event.box.first_recent_uid == 2482);
316
 
        test_assert(event.box.last_change == 53);
317
 
 
318
 
        test_end();
319
 
}
320
 
 
321
 
static void test_dsync_proxy_box_select(void)
322
 
{
323
 
        test_begin("proxy server box select");
324
 
 
325
 
        test_assert(run_cmd("BOX-SELECT", TEST_MAILBOX_GUID1, NULL) == 1);
326
 
        test_assert(memcmp(test_worker->selected_mailbox.guid, test_mailbox_guid1, GUID_128_SIZE) == 0);
327
 
 
328
 
        test_assert(run_cmd("BOX-SELECT", TEST_MAILBOX_GUID2, NULL) == 1);
329
 
        test_assert(memcmp(test_worker->selected_mailbox.guid, test_mailbox_guid2, GUID_128_SIZE) == 0);
330
 
 
331
 
        test_end();
332
 
}
333
 
 
334
 
static void test_dsync_proxy_msg_update(void)
335
 
{
336
 
        struct test_dsync_msg_event event;
337
 
 
338
 
        test_begin("proxy server msg update");
339
 
 
340
 
        test_assert(run_cmd("MSG-UPDATE", "123", "4782782842924",
341
 
                            "kw1 "ALL_MAIL_FLAGS" kw2", NULL) == 1);
342
 
        test_assert(test_dsync_worker_next_msg_event(test_worker, &event));
343
 
        test_assert(event.type == LAST_MSG_TYPE_UPDATE);
344
 
        test_assert(event.msg.uid == 123);
345
 
        test_assert(event.msg.modseq == 4782782842924);
346
 
        test_assert(event.msg.flags == MAIL_FLAGS_MASK);
347
 
        test_assert(strcmp(event.msg.keywords[0], "kw1") == 0);
348
 
        test_assert(strcmp(event.msg.keywords[1], "kw2") == 0);
349
 
        test_assert(event.msg.keywords[2] == NULL);
350
 
 
351
 
        test_end();
352
 
}
353
 
 
354
 
static void test_dsync_proxy_msg_uid_change(void)
355
 
{
356
 
        struct test_dsync_msg_event event;
357
 
 
358
 
        test_begin("proxy server msg uid change");
359
 
 
360
 
        test_assert(run_cmd("MSG-UID-CHANGE", "454", "995", NULL) == 1);
361
 
        test_assert(test_dsync_worker_next_msg_event(test_worker, &event));
362
 
        test_assert(event.type == LAST_MSG_TYPE_UPDATE_UID);
363
 
        test_assert(event.msg.uid == 454);
364
 
        test_assert(event.msg.modseq == 995);
365
 
 
366
 
        test_end();
367
 
}
368
 
 
369
 
static void test_dsync_proxy_msg_expunge(void)
370
 
{
371
 
        struct test_dsync_msg_event event;
372
 
 
373
 
        test_begin("proxy server msg expunge");
374
 
 
375
 
        test_assert(run_cmd("MSG-EXPUNGE", "8585", NULL) == 1);
376
 
        test_assert(test_dsync_worker_next_msg_event(test_worker, &event));
377
 
        test_assert(event.type == LAST_MSG_TYPE_EXPUNGE);
378
 
        test_assert(event.msg.uid == 8585);
379
 
 
380
 
        test_end();
381
 
}
382
 
 
383
 
static void test_dsync_proxy_msg_copy(void)
384
 
{
385
 
        struct test_dsync_msg_event msg_event;
386
 
 
387
 
        test_begin("proxy server msg copy");
388
 
 
389
 
        test_assert(run_cmd("MSG-COPY", TEST_MAILBOX_GUID1, "5454",
390
 
                            "copyguid", "5678", "74782482882924", "\\Seen foo \\Draft",
391
 
                            "8294284", NULL) == 1);
392
 
        test_assert(test_dsync_worker_next_msg_event(test_worker, &msg_event));
393
 
        test_assert(msg_event.type == LAST_MSG_TYPE_COPY);
394
 
        test_assert(memcmp(msg_event.copy_src_mailbox.guid, test_mailbox_guid1, GUID_128_SIZE) == 0);
395
 
        test_assert(msg_event.copy_src_uid == 5454);
396
 
        test_assert(strcmp(msg_event.msg.guid, "copyguid") == 0);
397
 
        test_assert(msg_event.msg.uid == 5678);
398
 
        test_assert(msg_event.msg.modseq == 74782482882924);
399
 
        test_assert(msg_event.msg.flags == (MAIL_SEEN | MAIL_DRAFT));
400
 
        test_assert(strcmp(msg_event.msg.keywords[0], "foo") == 0);
401
 
        test_assert(msg_event.msg.keywords[1] == NULL);
402
 
        test_assert(msg_event.msg.save_date == 8294284);
403
 
 
404
 
        test_end();
405
 
}
406
 
 
407
 
static void test_dsync_proxy_msg_save(void)
408
 
{
409
 
        static const char *input = "..dotty\n..behavior\nfrom you\n.\nstop";
410
 
        struct test_dsync_msg_event event;
411
 
        const unsigned char *data;
412
 
        size_t size;
413
 
 
414
 
        test_begin("proxy server msg save");
415
 
 
416
 
        server->input = i_stream_create_from_data(input, strlen(input));
417
 
 
418
 
        test_assert(run_cmd("MSG-SAVE", "28492428", "pop3uidl",
419
 
                            "saveguid", "874", "33982482882924", "\\Flagged bar \\Answered",
420
 
                            "8294284", NULL) == 1);
421
 
        test_assert(test_dsync_worker_next_msg_event(test_worker, &event));
422
 
        test_assert(event.type == LAST_MSG_TYPE_SAVE);
423
 
        test_assert(event.save_data.received_date == 28492428);
424
 
        test_assert(strcmp(event.save_data.pop3_uidl, "pop3uidl") == 0);
425
 
        test_assert(strcmp(event.save_body, ".dotty\n.behavior\nfrom you") == 0);
426
 
 
427
 
        test_assert(strcmp(event.msg.guid, "saveguid") == 0);
428
 
        test_assert(event.msg.uid == 874);
429
 
        test_assert(event.msg.modseq == 33982482882924);
430
 
        test_assert(event.msg.flags == (MAIL_FLAGGED | MAIL_ANSWERED));
431
 
        test_assert(strcmp(event.msg.keywords[0], "bar") == 0);
432
 
        test_assert(event.msg.keywords[1] == NULL);
433
 
        test_assert(event.msg.save_date == 8294284);
434
 
 
435
 
        data = i_stream_get_data(server->input, &size);
436
 
        test_assert(size == 4 && memcmp(data, "stop", 4) == 0);
437
 
        i_stream_destroy(&server->input);
438
 
 
439
 
        test_end();
440
 
}
441
 
 
442
 
static struct dsync_proxy_server *
443
 
dsync_proxy_server_init_test(buffer_t *outbuf)
444
 
{
445
 
        struct dsync_proxy_server *server;
446
 
 
447
 
        server = i_new(struct dsync_proxy_server, 1);
448
 
        server->worker = dsync_worker_init_test();
449
 
        server->fd_in = 0;
450
 
        server->fd_out = 0;
451
 
 
452
 
        server->cmd_pool = pool_alloconly_create("worker server cmd", 1024);
453
 
        server->output = o_stream_create_buffer(outbuf);
454
 
        return server;
455
 
}
456
 
 
457
 
int main(void)
458
 
{
459
 
        static void (*test_functions[])(void) = {
460
 
                test_dsync_proxy_box_list,
461
 
                test_dsync_proxy_subs_list,
462
 
                test_dsync_proxy_msg_list,
463
 
                test_dsync_proxy_box_create,
464
 
                test_dsync_proxy_box_delete,
465
 
                test_dsync_proxy_box_rename,
466
 
                test_dsync_proxy_box_update,
467
 
                test_dsync_proxy_box_select,
468
 
                test_dsync_proxy_msg_update,
469
 
                test_dsync_proxy_msg_uid_change,
470
 
                test_dsync_proxy_msg_expunge,
471
 
                test_dsync_proxy_msg_copy,
472
 
                test_dsync_proxy_msg_save,
473
 
                NULL
474
 
        };
475
 
 
476
 
        test_init();
477
 
 
478
 
        out = buffer_create_dynamic(default_pool, 1024);
479
 
        server = dsync_proxy_server_init_test(out);
480
 
        test_worker = (struct test_dsync_worker *)server->worker;
481
 
 
482
 
        test_run_funcs(test_functions);
483
 
        return test_deinit();
484
 
}