mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
chsck_vio: fix readdir test by removing it.
The code that was creating the files in the directory was removed in commit6906b8d30c. The directory is empty so the result is expected to be null. It was passing before because the code was returning an entry for . and .., but since commit35f80bd439this is no longer the case
This commit is contained in:
parent
d8206ccbc7
commit
d113498c7b
@ -137,31 +137,12 @@ static void check_csync_vio_closedir_null(void **state)
|
||||
assert_int_equal(rc, -1);
|
||||
}
|
||||
|
||||
static void check_csync_vio_readdir(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
csync_vio_handle_t *dh;
|
||||
std::unique_ptr<csync_file_stat_t> dirent;
|
||||
int rc;
|
||||
|
||||
dh = csync_vio_opendir(csync, CSYNC_TEST_DIR);
|
||||
assert_non_null(dh);
|
||||
|
||||
dirent = csync_vio_readdir(csync, dh);
|
||||
assert_non_null(dirent.get());
|
||||
|
||||
rc = csync_vio_closedir(csync, dh);
|
||||
assert_int_equal(rc, 0);
|
||||
}
|
||||
|
||||
|
||||
int torture_run_tests(void)
|
||||
{
|
||||
const struct CMUnitTest tests[] = {
|
||||
cmocka_unit_test_setup_teardown(check_csync_vio_opendir, setup_dir, teardown),
|
||||
cmocka_unit_test_setup_teardown(check_csync_vio_opendir_perm, setup, teardown),
|
||||
cmocka_unit_test(check_csync_vio_closedir_null),
|
||||
cmocka_unit_test_setup_teardown(check_csync_vio_readdir, setup_dir, teardown),
|
||||
};
|
||||
|
||||
return cmocka_run_group_tests(tests, NULL, NULL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user