src/server/test/webdav.c

branch
webdav
changeset 307
8787cb5ebab3
parent 306
e03737cea6e2
child 320
a40f7af1b670
equal deleted inserted replaced
306:e03737cea6e2 307:8787cb5ebab3
53 53
54 // backend2 54 // backend2
55 static int backend2_propfind_init( 55 static int backend2_propfind_init(
56 WebdavPropfindRequest *propfind, 56 WebdavPropfindRequest *propfind,
57 const char *path, 57 const char *path,
58 const char *href,
58 WebdavPList **outPList) 59 WebdavPList **outPList)
59 { 60 {
60 backend2_init_called = 1; 61 backend2_init_called = 1;
61 return 0; 62 return 0;
62 } 63 }
143 144
144 145
145 static int backend1_propfind_init( 146 static int backend1_propfind_init(
146 WebdavPropfindRequest *propfind, 147 WebdavPropfindRequest *propfind,
147 const char *path, 148 const char *path,
149 const char *href,
148 WebdavPList **outPList) 150 WebdavPList **outPList)
149 { 151 {
150 backend1_init_called = 1; 152 backend1_init_called = 1;
151 153
152 WebdavPList *plist = *outPList; 154 WebdavPList *plist = *outPList;
311 WebdavResponse *response = (WebdavResponse*)ms; 313 WebdavResponse *response = (WebdavResponse*)ms;
312 314
313 UcxList *requests = NULL; 315 UcxList *requests = NULL;
314 316
315 // Initialize all Webdav Backends 317 // Initialize all Webdav Backends
316 if(webdav_propfind_init(&backend1, propfind, "/", &requests)) { 318 if(webdav_propfind_init(&backend1, propfind, "/", "/", &requests)) {
317 return NULL; 319 return NULL;
318 } 320 }
319 321
320 return webdav_create_propfind_operation( 322 return webdav_create_propfind_operation(
321 (*out_sn), 323 (*out_sn),
994 WebdavPropfindRequest *propfind; 996 WebdavPropfindRequest *propfind;
995 UCX_TEST_BEGIN; 997 UCX_TEST_BEGIN;
996 UCX_TEST_ASSERT(!test_init(&sn, &rq, &propfind, TEST_PROPFIND1), "init failed"); 998 UCX_TEST_ASSERT(!test_init(&sn, &rq, &propfind, TEST_PROPFIND1), "init failed");
997 999
998 UcxList *requests = NULL; 1000 UcxList *requests = NULL;
999 int err = webdav_propfind_init(&backend1, propfind, "/", &requests); 1001 int err = webdav_propfind_init(&backend1, propfind, "/", "/", &requests);
1000 1002
1001 UCX_TEST_ASSERT(!err, "webdav_propfind_init failed"); 1003 UCX_TEST_ASSERT(!err, "webdav_propfind_init failed");
1002 UCX_TEST_ASSERT(requests, "request list is empty"); 1004 UCX_TEST_ASSERT(requests, "request list is empty");
1003 UCX_TEST_ASSERT(ucx_list_size(requests), "request list has wrong size"); 1005 UCX_TEST_ASSERT(ucx_list_size(requests), "request list has wrong size");
1004 1006

mercurial