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:479:    return false;    }    return true;   }      protected void prepare_testdir(string testdir)   {    testdir = has_suffix(testdir, "/") ? testdir[..<1] : testdir;    report_debug("Webdav: Test dir is: %O\n", testdir);    -  if (filesystem_check_exists(testdir)) { -  // In case it is not empty. -  filesystem_recursive_rm(testdir); -  } +  // Consider working directly with the filesystem instead. +  // filesystem_recursive_rm(testdir); +  +  // webdav_mkcol may return true even it the dir already existed. Therefor +  // we always clean. +  webdav_request("DELETE", testdir); // In case it already exists...    webdav_request("MKCOL", testdir);    webdav_ls(testdir+"/", ({ testdir+"/" }));   }      // Clean/Create the testcase dir.   protected void before_testcase(string testcase)   {    this::testcase_dir = Stdio.append_path(this::testdir, testcase, "/");    prepare_testdir(this::testcase_dir);   }