b9659b2018-02-21Karl Gustav Sterneberg inherit "etc/test/tests/http/WebdavTestBase.pike";
4044dc2018-02-16Henrik Grubbström (Grubba) 
0a91882018-02-21Karl Gustav Sterneberg private string testdir = "/testdir/"; private string filesystem_dir = "$VARDIR/testsuite/webdav";
4044dc2018-02-16Henrik Grubbström (Grubba) // Expanded filesystem_dir.
0a91882018-02-21Karl Gustav Sterneberg private string real_dir; string get_testdir() { return testdir; }
4044dc2018-02-16Henrik Grubbström (Grubba) 
70ce1c2018-02-16Henrik Grubbström (Grubba) int filesystem_check_exists(string path) { string real_path = Stdio.append_path(real_dir, path); return Stdio.is_file(real_path); }
4044dc2018-02-16Henrik Grubbström (Grubba) 
70ce1c2018-02-16Henrik Grubbström (Grubba) string filesystem_read_file(string path)
4044dc2018-02-16Henrik Grubbström (Grubba) { string real_path = Stdio.append_path(real_dir, path);
70ce1c2018-02-16Henrik Grubbström (Grubba)  return Stdio.read_bytes(real_path); }
4044dc2018-02-16Henrik Grubbström (Grubba) void setup() {
0a91882018-02-21Karl Gustav Sterneberg  webdav_mount_point = "webdav/"; basic_auth = "test:test";
4044dc2018-02-16Henrik Grubbström (Grubba)  real_dir = roxen_path(filesystem_dir); report_debug("Webdav real_dir: %O\n", real_dir); Stdio.mkdirhier(real_dir); }