13be29 | 2018-02-21 | Karl Gustav Sterneberg | | inherit "etc/test/tests/http/WebdavTestBase.pike";
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | |
|
c5d921 | 2018-02-21 | Karl Gustav Sterneberg | | private string testdir = "/testdir/";
private string filesystem_dir = "$VARDIR/testsuite/webdav";
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | |
|
c5d921 | 2018-02-21 | Karl Gustav Sterneberg | | private string real_dir;
string get_testdir() {
return testdir;
}
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | |
|
30c506 | 2018-02-16 | Henrik Grubbström (Grubba) | | int filesystem_check_exists(string path)
{
string real_path = Stdio.append_path(real_dir, path);
return Stdio.is_file(real_path);
}
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | |
|
30c506 | 2018-02-16 | Henrik Grubbström (Grubba) | | string filesystem_read_file(string path)
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | | {
string real_path = Stdio.append_path(real_dir, path);
|
30c506 | 2018-02-16 | Henrik Grubbström (Grubba) | | return Stdio.read_bytes(real_path);
}
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | | void setup()
{
|
c5d921 | 2018-02-21 | Karl Gustav Sterneberg | | webdav_mount_point = "webdav/";
basic_auth = "test:test";
|
ad307f | 2018-02-16 | Henrik Grubbström (Grubba) | | real_dir = roxen_path(filesystem_dir);
report_debug("Webdav real_dir: %O\n", real_dir);
Stdio.mkdirhier(real_dir);
}
|