_caldav__PROPFIND_android (private)
_caldav__PROPFIND_android
Defined in packages/caldav/tcl/test/caldav-test-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ set info [::caldav::test::basic_setup] set user_info [dict get $info user_info] try { # # Checks functionality of the CalDAV server # CalDAV Sync Adapter (Android) https://github.com/gggard/AndroidCaldavSyncAdapater Version:0.1.1 # set d [::acs::test::http -user_info $user_info -method PROPFIND -headers {Content-Type text/xml} -body {<?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:"><d:prop><d:current-user-principal /><d:principal-URL /> </d:prop></d:propfind> } /caldav] #ns_log notice "run returns $d" #ns_log notice "... [ns_set array [dict get $d headers]]" aa_equals "Status code valid" [dict get $d status] 207 set xml [dict get $d body] aa_log "Result body:<pre>\n[::aa_test::visualize_control_chars $xml]</pre>" ::caldav::test::foreach_response response $xml { ::acs::test::xpath::equals $response { d:propstat/d:prop/d:current-user-principal /caldav/principal } set principal_url [::acs::test::xpath::get_text $response d:propstat/d:prop/d:current-user-principal] } # # Principal query # set d [::acs::test::http -user_info $user_info -method PROPFIND -headers {Content-Type text/xml} -body {<?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"><d:prop><c:calendar-home-set/> </d:prop></d:propfind> } $principal_url] #ns_log notice "run returns $d" #ns_log notice "... [ns_set array [dict get $d headers]]" aa_equals "Status code valid" [dict get $d status] 207 set xml [dict get $d body] aa_log "Result body:<pre>\n[::aa_test::visualize_control_chars $xml]</pre>" ::caldav::test::foreach_response response $xml { ::acs::test::xpath::equals $response { d:propstat/d:prop/c:calendar-home-set /caldav/calendar } set calendar_url [::acs::test::xpath::get_text $response d:propstat/d:prop/c:calendar-home-set] } # # Calendar Query from CalDAV Sync Adapter (Android) # set d [::acs::test::http -user_info $user_info -method PROPFIND -headers {Content-Type text/xml} -body {<?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:ic="http://apple.com/ns/ical/"> <d:prop><d:displayname /><d:resourcetype /><ic:calendar-color /><cs:getctag /></d:prop> </d:propfind> } $calendar_url] #ns_log notice "run returns $d" #ns_log notice "... [ns_set array [dict get $d headers]]" aa_equals "Status code valid" [dict get $d status] 207 set xml [dict get $d body] aa_log "Result body:<pre>\n[::aa_test::visualize_control_chars $xml]</pre>" ::caldav::test::foreach_response response $xml { ::acs::test::xpath::non_empty $response { d:propstat/d:prop/d:displayname d:propstat/d:prop/cs:getctag } ::acs::test::xpath::equals $response { d:href /caldav/calendar/ } } } on error {errorMsg} { aa_true "Error msg: $errorMsg" 0 } finally { #calendar::delete -calendar_id $temp_calendar_id } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "PROPFIND_android (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle