summaryrefslogtreecommitdiff
path: root/tests/libtracker-common
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-11-06 10:55:02 +0100
committerCarlos Garnacho <carlosg@gnome.org>2018-11-08 21:42:45 +0100
commit35e92c3e587724e21aff216786210bd1f249ed7b (patch)
tree486f13e24980b5a2d299b4ccbef80b7aa200b5e0 /tests/libtracker-common
parent46b9133c7548384dd9a1b027e2ef91fc712e4a94 (diff)
downloadtracker-35e92c3e587724e21aff216786210bd1f249ed7b.tar.gz
libtracker-common: Drop unused function and its test
This function is no longer used, so makes no sense to test for it. This test used to break on CI with the default docker images because of user permissions, so this obstacle is removed.
Diffstat (limited to 'tests/libtracker-common')
-rw-r--r--tests/libtracker-common/tracker-file-utils-test.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/libtracker-common/tracker-file-utils-test.c b/tests/libtracker-common/tracker-file-utils-test.c
index d1ddf3004..93a409b37 100644
--- a/tests/libtracker-common/tracker-file-utils-test.c
+++ b/tests/libtracker-common/tracker-file-utils-test.c
@@ -368,33 +368,6 @@ test_file_system_has_enough_space ()
}
static void
-test_file_exists_and_writable ()
-{
- const gchar *path = "./test-dir-remove-afterwards";
-
- if (g_file_test (path, G_FILE_TEST_EXISTS)) {
- g_assert_cmpint (g_remove (path), ==, 0);
- }
-
- /* This should create the directory with write access*/
- g_assert (tracker_path_has_write_access_or_was_created (path));
- g_assert (g_file_test (path, G_FILE_TEST_EXISTS));
-
- /* This time exists and has write access */
- g_assert (tracker_path_has_write_access_or_was_created (path));
-
- g_assert_cmpint (chmod (path, S_IRUSR & S_IRGRP), ==, 0);
-
- /* Exists but is not writable */
- g_assert (!tracker_path_has_write_access_or_was_created (path));
-
- /* Doesn't exist and cannot be created */
- g_assert (!tracker_path_has_write_access_or_was_created ("/var/log/tracker-test"));
-
- g_assert_cmpint (g_remove (path), ==, 0);
-}
-
-static void
test_file_utils_is_hidden ()
{
GFile *f;
@@ -460,8 +433,6 @@ main (int argc, char **argv)
test_file_system_get_remaining_space_percentage);
g_test_add_func ("/libtracker-common/file-utils/has_enough_space",
test_file_system_has_enough_space);
- g_test_add_func ("/libtracker-common/file-utils/has_write_access_or_was_created",
- test_file_exists_and_writable);
g_test_add_func ("/libtracker-common/file-utils/is_hidden",
test_file_utils_is_hidden);
g_test_add_func ("/libtracker-common/file-utils/cmp",