[tracker-miners/wip/carlosg/dbus-api-changes: 3/4] tests: Hook up the tracker-index service for tests



commit 1a0e4749d76d1b2e7b2fac14808c05c44644d642
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jun 21 10:38:16 2020 +0200

    tests: Hook up the tracker-index service for tests
    
    Add the missing bits to handle this as a separate DBus service.

 tests/functional-tests/minerhelper.py                                | 5 +++--
 tests/services/meson.build                                           | 5 +++++
 tests/services/org.freedesktop.Tracker3.Miner.Files.Index.service.in | 4 ++++
 3 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/tests/functional-tests/minerhelper.py b/tests/functional-tests/minerhelper.py
index 0df14a3d6..77c4b4b69 100644
--- a/tests/functional-tests/minerhelper.py
+++ b/tests/functional-tests/minerhelper.py
@@ -45,6 +45,7 @@ class MinerFsHelper ():
     MINERFS_BUSNAME = "org.freedesktop.Tracker3.Miner.Files"
     MINERFS_OBJ_PATH = "/org/freedesktop/Tracker3/Miner/Files"
     MINER_IFACE = "org.freedesktop.Tracker3.Miner"
+    MINERFS_INDEX_BUSNAME = "org.freedesktop.Tracker3.Miner.Files.Index"
     MINERFS_INDEX_OBJ_PATH = "/org/freedesktop/Tracker3/Miner/Files/Index"
     MINER_INDEX_IFACE = "org.freedesktop.Tracker3.Miner.Files.Index"
 
@@ -61,7 +62,7 @@ class MinerFsHelper ():
 
         self.index = Gio.DBusProxy.new_sync(
             self.bus, Gio.DBusProxyFlags.DO_NOT_AUTO_START_AT_CONSTRUCTION, None,
-            self.MINERFS_BUSNAME, self.MINERFS_INDEX_OBJ_PATH, self.MINER_INDEX_IFACE)
+            self.MINERFS_INDEX_BUSNAME, self.MINERFS_INDEX_OBJ_PATH, self.MINER_INDEX_IFACE)
 
     def start(self):
         self.miner_fs.Start()
@@ -139,4 +140,4 @@ class MinerFsHelper ():
             GLib.source_remove(timeout_id)
 
     def index_file(self, uri):
-        return self.index.IndexFile('(s)', uri)
+        return self.index.IndexFile('(sas)', uri, [])
diff --git a/tests/services/meson.build b/tests/services/meson.build
index a2e1dcf28..a37acf9a3 100644
--- a/tests/services/meson.build
+++ b/tests/services/meson.build
@@ -12,6 +12,11 @@ tracker_miner_fs_test_dbus_service_file = configure_file(
     output: 'org.freedesktop.Tracker3.Miner.Files.service',
     configuration: conf)
 
+tracker_index_test_dbus_service_file = configure_file(
+    input: 'org.freedesktop.Tracker3.Miner.Files.Index.service.in',
+    output: 'org.freedesktop.Tracker3.Miner.Files.Index.service',
+    configuration: conf)
+
 tracker_writeback_test_dbus_service_file = configure_file(
     input: 'org.freedesktop.Tracker3.Writeback.service.in',
     output: 'org.freedesktop.Tracker3.Writeback.service',
diff --git a/tests/services/org.freedesktop.Tracker3.Miner.Files.Index.service.in 
b/tests/services/org.freedesktop.Tracker3.Miner.Files.Index.service.in
new file mode 100644
index 000000000..0b38a54dc
--- /dev/null
+++ b/tests/services/org.freedesktop.Tracker3.Miner.Files.Index.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker3.Miner.Files.Index
+Exec=@abs_top_builddir@/src/tracker-index/tracker-index-3
+SystemdService=tracker-index-3.service


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