Branch: Tag:

2018-04-03

2018-04-03 13:12:24 by Karl Gustav Sterneberg <kg@roxen.com>

Testsuite [WebDAV]: Removed some superfluous use of "ASSERT_CALL()".

1348:    ASSERT_EQUAL(res->status, STATUS_LOCKED);    verify_lock_token(res);    current_locks = locks; -  res = ASSERT_CALL(webdav_request, method, file1, +  res = webdav_request(method, file1,    ([ "new-uri": file2 ]) + headers);    ASSERT_EQUAL(res->status, STATUS_NO_CONTENT);    ASSERT_TRUE(filesystem_compare_files, file1, file2);
1423:    ASSERT_CALL_TRUE(filesystem_is_file, file);    ASSERT_CALL_FALSE(filesystem_is_dir, file);    mapping(string:string) locks = ([]); -  ASSERT_CALL(webdav_lock, file, locks, STATUS_OK); +  webdav_lock(file, locks, STATUS_OK);    WebDAVResponse res = webdav_request(method, dir,    ([ "new-uri": file ]) + headers);    ASSERT_EQUAL(res->status, STATUS_LOCKED);
1542:    webdav_put(dst_file2, "file2 in dir2", STATUS_CREATED);    webdav_lock(dst_file2, ([]), STATUS_OK);    if (method == "COPY") { -  WebDAVResponse res = ASSERT_CALL(webdav_copy, src_dir, dst_dir, +  WebDAVResponse res = webdav_copy(src_dir, dst_dir,    STATUS_MULTI_STATUS);    verify_multistatus_response_when_resource_locked(res, ({ dst_file2 }));    } else { -  WebDAVResponse res = ASSERT_CALL(webdav_move, src_dir, dst_dir, +  WebDAVResponse res = webdav_move(src_dir, dst_dir,    ([]), STATUS_MULTI_STATUS);    verify_multistatus_response_when_resource_locked(res, ({ dst_file2 }));    }
1578:    webdav_put(src_file2, "file2 in dir1", STATUS_CREATED);    webdav_lock(dst_file2, ([]), STATUS_OK);    if (method == "COPY") { -  WebDAVResponse res = ASSERT_CALL(webdav_copy, src_dir, dst_dir, +  WebDAVResponse res = webdav_copy(src_dir, dst_dir,    STATUS_MULTI_STATUS);    verify_multistatus_response_when_resource_locked(res, ({ dst_file2 }));    } else { -  WebDAVResponse res = ASSERT_CALL(webdav_move, src_dir, dst_dir, +  WebDAVResponse res = webdav_move(src_dir, dst_dir,    ([]), STATUS_MULTI_STATUS);    verify_multistatus_response_when_resource_locked(res, ({ dst_file2 }));    }
2061:    For copy/move test where destination exists and is a directory,    Test both with an empty destination directory and with a non empty    destination directory. (We already test at least one of the cases.) -  -  Hmm, would it be better to remove all use of 'ASSERT_CALL'? Easier to -  understand errors in log? Or good as is? +    */