973 UCX_TEST_ASSERT(backend2_propfind_do_count == 5, "backend2 propfind_do wrong count"); |
973 UCX_TEST_ASSERT(backend2_propfind_do_count == 5, "backend2 propfind_do wrong count"); |
974 |
974 |
975 UCX_TEST_END; |
975 UCX_TEST_END; |
976 testutil_destroy_session(sn); |
976 testutil_destroy_session(sn); |
977 } |
977 } |
|
978 |
|
979 UCX_TEST(test_webdav_propfind) { |
|
980 Session *sn = testutil_session(); |
|
981 Request *rq = testutil_request(sn->pool, "PROPFIND", "/"); |
|
982 |
|
983 pblock_nvinsert("path", "/", rq->vars); |
|
984 pblock_nvinsert("uri", "/", rq->reqpb); |
|
985 |
|
986 |
|
987 TestIOStream *st = testutil_iostream(2048, TRUE); |
|
988 sn->csd = st; |
|
989 |
|
990 testutil_request_body(sn, rq, TEST_PROPFIND1, strlen(TEST_PROPFIND1)); |
|
991 |
|
992 UCX_TEST_BEGIN; |
|
993 |
|
994 pblock *pb = pblock_create_pool(sn->pool, 4); |
|
995 |
|
996 int ret = webdav_propfind(pb, sn, rq); |
|
997 |
|
998 UCX_TEST_ASSERT(ret == REQ_PROCEED, "webdav_propfind (1) failed"); |
|
999 |
|
1000 xmlDoc *doc = xmlReadMemory( |
|
1001 st->buf->space, st->buf->size, NULL, NULL, 0); |
|
1002 UCX_TEST_ASSERT(doc, "response is not valid xml"); |
|
1003 |
|
1004 //printf("\n\n%.*s\n", (int)st->buf->size, st->buf->space); |
|
1005 |
|
1006 UCX_TEST_END; |
|
1007 testutil_destroy_session(sn); |
|
1008 } |