Roxen.git
/
server
/
etc
/
test
/
tests
/
http
/
RoxenTest_webdav.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/etc/test/tests/http/RoxenTest_webdav.pike:268:
base_uri = Standards.URI((url_data->path || "/") + webdav_mount_point, url_uri); base_uri->port = prot->port; base_uri->host = prot->ip; if (basic_auth) { base_uri->user = (basic_auth/":")[0]; base_uri->password = (basic_auth/":")[1..] * ":"; }
+
report_debug("Webdav testsuite: Base URI: %s\n", (string)base_uri);
+
base_headers = ([ "host": url_uri->host, "user-agent": "Roxen WebDAV Tester", ]); con = 0; // Make sure that we get a new connection. mapping(string:string) locks = ([]); // Clean the test directory.
Roxen.git/server/etc/test/tests/http/RoxenTest_webdav.pike:313:
test_true(webdav_delete, "/test_file.txt", locks); test_false(webdav_put, "/test_file.txt", "TEST FILE 6\n"); current_locks = locks + ([]); test_true(webdav_put, "/test_file.txt", "TEST FILE 7\n"); test_true(webdav_delete, "/test_file.txt", locks); //test_false(webdav_mkcol, "/test_dir/sub_dir"); test_true(webdav_mkcol, "/test_dir"); test_true(webdav_mkcol, "/test_dir/sub_dir"); test_true(webdav_put, "/test_dir/test_file.txt", "TEST FILE\n");
+
+
test_true(webdav_lock, "/test_dir/test_file.txt", locks);
+
test_false(webdav_move, "/test_dir/test_file.txt", "/test_file.txt", locks);
+
test_true(webdav_copy, "/test_dir/test_file.txt", "/test_file.txt");
+
test_false(webdav_copy, "/test_file.txt", "/test_dir/test_file.txt");
+
current_locks = locks + ([]);
+
test_true(webdav_move, "/test_dir/test_file.txt", "/test_file_2.txt", locks);
+
// NB: /test_dir/test_file.txt lock invalidated by the move above.
+
test_false(webdav_copy, "/test_file.txt", "/test_dir/test_file.txt");
+
current_locks = locks + ([]);
+
test_true(webdav_copy, "/test_file.txt", "/test_dir/test_file.txt");
+
test_true(webdav_lock, "/test_dir/test_file.txt", locks);
+
test_false(webdav_copy, "/test_file.txt", "/test_dir/test_file.txt");
+
current_locks = locks + ([]);
+
test_true(webdav_copy, "/test_file.txt", "/test_dir/test_file.txt");
+
test_true(webdav_unlock, "/test_dir/test_file.txt", locks);
} } }