Roxen.git / server / etc / test / modules / TEST.pmod / http.pmod / WebDAV.pmod / TestBase.pike

version» Context lines:

Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:1516:    }    webdav_ls(this::testcase_dir,    ({ this::testcase_dir, dir1, dir2, file1, file2 }));   }      public void test_copy_dest_exist_overwrite_header_F()   {    do_test_copy_dest_exist_overwrite_header_F("COPY");   }    - private void do_test_copy_col_fails_partly_1(string method) + private void do_test_copy_col_fails_due_to_locked_file(string method)   {    ASSERT_TRUE(method == "COPY" || method == "MOVE");    string src_dir = Stdio.append_path(this::testcase_dir, "A");    string dst_dir = Stdio.append_path(this::testcase_dir, "B");    string src_file1 = Stdio.append_path(src_dir, "file1.txt");    string src_file2 = Stdio.append_path(src_dir, "file2.txt");    string dst_file1 = Stdio.append_path(dst_dir, "file1.txt");    string dst_file2 = Stdio.append_path(dst_dir, "file2.txt");    webdav_mkcol(src_dir, STATUS_CREATED);    webdav_mkcol(dst_dir, STATUS_CREATED);
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:1553:    ({ this::testcase_dir,    src_dir,    src_file1,    src_file2,    dst_dir,    dst_file1,    dst_file2 }));    ASSERT_CALL_TRUE(filesystem_check_content, dst_file2, "file2 in dir2");   }    - private void do_test_copy_col_fails_partly_2(string method) + private void do_test_copy_col_fails_due_to_locked_non_existing_file(string method)   {    ASSERT_TRUE(method == "COPY" || method == "MOVE");    string src_dir = Stdio.append_path(this::testcase_dir, "A");    string dst_dir = Stdio.append_path(this::testcase_dir, "B");    string src_file1 = Stdio.append_path(src_dir, "file1.txt");    string src_file2 = Stdio.append_path(src_dir, "file2.txt");    string dst_file1 = Stdio.append_path(dst_dir, "file1.txt");    string dst_file2 = Stdio.append_path(dst_dir, "file2.txt");    webdav_mkcol(src_dir, STATUS_CREATED);    webdav_put(src_file1, "file1 in dir1", STATUS_CREATED);
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:1596:    } else { // method == "MOVE"    webdav_ls(this::testcase_dir,    ({ this::testcase_dir,    src_dir,    src_file1,    src_file2 }));    }    ASSERT_CALL_FALSE(filesystem_check_exists, dst_file2);   }    - public void test_copy_col_fails_partly_1() + public void test_copy_col_fails_due_to_locked_file()   { -  do_test_copy_col_fails_partly_1("COPY"); +  do_test_copy_col_fails_due_to_locked_file("COPY");   }    - public void test_copy_col_fails_partly_2() + public void test_copy_col_fails_due_to_locked_non_existing_file()   { -  do_test_copy_col_fails_partly_2("COPY"); +  do_test_copy_col_fails_due_to_locked_non_existing_file("COPY");   }      // After detecting an error, the COPY operation SHOULD try   // to finish as much of the original copy operation as possible.   // If an error in executing the COPY method occurs with a resource other   // than the resource identified in the Request-URI, then the response   // MUST be a 207 (Multi-Status), and the URL of the resource causing the   // failure MUST appear with the specific error.      private void do_test_copy_destination_equals_src(string method,
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:1891:    do_test_copy_dest_exist_overwrite_header_F("MOVE");   }      // 207 (Multi-Status) - Multiple resources were to be affected by the   // MOVE, but errors on some of them prevented the operation from taking   // place. Specific error messages, together with the most appropriate   // of the source and destination URLs, appear in the body of the multi-   // status response. For example, if a source resource was locked and   // could not be moved, then the source resource URL appears with the 423   // (Locked) status. - public void test_move_col_fails_partly_1() + public void test_move_col_fails_due_to_locked_file()   { -  do_test_copy_col_fails_partly_1("MOVE"); +  do_test_copy_col_fails_due_to_locked_file("MOVE");   }    - public void test_move_col_fails_partly_2() + public void test_move_col_fails_due_to_locked_non_existing_file()   { -  do_test_copy_col_fails_partly_2("MOVE"); +  do_test_copy_col_fails_due_to_locked_non_existing_file("MOVE");   }      // 403 (Forbidden) - Among many possible reasons for forbidding a MOVE   // operation, this status code is recommended for use when the source   // and destination resources are the same.   public void test_move_destination_equals_src_no_overwrite_header()   {    do_test_copy_destination_equals_src("MOVE", UNDEFINED);   }