[tracker] tests, libtracker-miner: Fix expected results on directory move operations



commit 85b6a274b119d3c6742fec10b9a8f38a876a1296
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Dec 20 17:16:33 2010 +0100

    tests,libtracker-miner: Fix expected results on directory move operations

 tests/libtracker-miner/tracker-monitor-test.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/tests/libtracker-miner/tracker-monitor-test.c b/tests/libtracker-miner/tracker-monitor-test.c
index 41c8242..26c2447 100644
--- a/tests/libtracker-miner/tracker-monitor-test.c
+++ b/tests/libtracker-miner/tracker-monitor-test.c
@@ -1395,8 +1395,11 @@ test_monitor_directory_event_moved_to_monitored (TrackerMonitorTestFixture *fixt
 
 	/* Cleanup environment */
 	tracker_monitor_set_enabled (fixture->monitor, FALSE);
-	/* Note that monitor is now in dest_dir */
-	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, dest_dir), ==, TRUE);
+	/* Since tracker 0.9.33, monitors are NOT moved to the new location directly when the
+	 * directory is moved, that is done by the upper layers.
+	 * Note that monitor is now in dest_dir */
+	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, source_dir), ==, TRUE);
+	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, dest_dir), !=, TRUE);
 	g_assert_cmpint (g_file_delete (file_in_dest_dir, NULL, NULL), ==, TRUE);
 	g_assert_cmpint (g_file_delete (dest_dir, NULL, NULL), ==, TRUE);
 	g_object_unref (source_dir);
@@ -1511,8 +1514,11 @@ test_monitor_directory_event_moved_to_monitored_after_file_create (TrackerMonito
 
 	/* Cleanup environment */
 	tracker_monitor_set_enabled (fixture->monitor, FALSE);
-	/* Note that monitor is now in dest_dir */
-	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, dest_dir), ==, TRUE);
+	/* Since tracker 0.9.33, monitors are NOT moved to the new location directly when the
+	 * directory is moved, that is done by the upper layers.
+	 * Note that monitor is now in dest_dir */
+	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, source_dir), ==, TRUE);
+	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, dest_dir), !=, TRUE);
 	g_assert_cmpint (g_file_delete (file_in_dest_dir, NULL, NULL), ==, TRUE);
 	g_assert_cmpint (g_file_delete (dest_dir, NULL, NULL), ==, TRUE);
 	g_object_unref (source_dir);
@@ -1631,8 +1637,11 @@ test_monitor_directory_event_moved_to_monitored_after_file_update (TrackerMonito
 
 	/* Cleanup environment */
 	tracker_monitor_set_enabled (fixture->monitor, FALSE);
-	/* Note that monitor is now in dest_dir */
-	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, dest_dir), ==, TRUE);
+	/* Since tracker 0.9.33, monitors are NOT moved to the new location directly when the
+	 * directory is moved, that is done by the upper layers.
+	 * Note that monitor is now in dest_dir */
+	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, source_dir), ==, TRUE);
+	g_assert_cmpint (tracker_monitor_remove (fixture->monitor, dest_dir), !=, TRUE);
 	g_assert_cmpint (g_file_delete (file_in_dest_dir, NULL, NULL), ==, TRUE);
 	g_assert_cmpint (g_file_delete (dest_dir, NULL, NULL), ==, TRUE);
 	g_object_unref (source_dir);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]