Branch: Tag:

2018-04-03

2018-04-03 13:12:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Testsuite [WebDAV]: Some more fixes.

UNLOCK returns NO_CONTENT on success.

MOVE returns NO_CONTENT if the destination already existed on success.

Added some extra validation of the result of the MOVE in
test_move_destination_locked().

Fixed the initial filesystem in test_move_destination_unlocked().

Fixed the expected filesystem result in test_move_destination_locked().

1811:    webdav_lock(resource_to_lock, locks, STATUS_OK);    WebDAVResponse res = webdav_move(src, dst, ([]), STATUS_LOCKED);    verify_lock_token(res); -  webdav_unlock(resource_to_lock, locks, STATUS_OK); +  webdav_unlock(resource_to_lock, locks, STATUS_NO_CONTENT);    }    WebDAVResponse res = webdav_move(src, dst, ([]), STATUS_CREATED);    webdav_ls(this::testcase_dir,
1832:    string src_child = Stdio.append_path(src, child_name);    string dst_parent = Stdio.append_path(this::testcase_dir, "dst_parent");    string dst = Stdio.append_path(dst_parent, "dst"); -  string dst_child = Stdio.append_path(dst_parent, child_name); // Must be same name as src child! +  string dst_child = Stdio.append_path(dst, child_name); // Must be same name as src child!    foreach (({src, dst_parent, dst}), string col) {    webdav_mkcol(col, STATUS_CREATED);    }
1843:    webdav_lock(resource_to_lock, locks, STATUS_OK);    WebDAVResponse res = webdav_move(src, dst, ([]), STATUS_LOCKED);    verify_lock_token(res); -  webdav_unlock(resource_to_lock, locks, STATUS_OK); +  webdav_unlock(resource_to_lock, locks, STATUS_NO_CONTENT);    } -  WebDAVResponse res = webdav_move(src, dst, ([]), STATUS_CREATED); +  WebDAVResponse res = webdav_move(src, dst, ([]), STATUS_NO_CONTENT); +  filesystem_check_content(dst_child, "src child content");    webdav_ls(this::testcase_dir,    ({ this::testcase_dir, -  +  dst_parent,    dst,    dst_child }));   }