[tracker-miners/sam/tracker-3.0-functional-tests: 2/5] functional-tests: Remove Maemo application tests



commit 389aa2b2f8f2df1d8def01ec8c0ef963cdada492
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Feb 11 01:06:09 2020 +0100

    functional-tests: Remove Maemo application tests
    
    These were already obsolete by a decade. They expect to insert data into
    the miner-fs database, but we don't expect Tracker 3.0 apps to do that.

 tests/functional-tests/600-applications-camera.py  | 253 ---------------------
 tests/functional-tests/601-applications-sync.py    | 125 ----------
 tests/functional-tests/fixtures.py                 |  64 ------
 tests/functional-tests/meson.build                 |   2 -
 .../test-apps-data/test-image-1.jpg                | Bin 7558 -> 0 bytes
 .../test-apps-data/test-music-1.mp3                | Bin 61547 -> 0 bytes
 .../test-apps-data/test-video-1.mp4                | Bin 211931 -> 0 bytes
 7 files changed, 444 deletions(-)
---
diff --git a/tests/functional-tests/fixtures.py b/tests/functional-tests/fixtures.py
index d0e8a5c3a..6e6baeaa8 100644
--- a/tests/functional-tests/fixtures.py
+++ b/tests/functional-tests/fixtures.py
@@ -479,67 +479,3 @@ class TrackerWritebackTest (TrackerMinerTest):
         raise Exception(
             "Timeout waiting for %s to be updated (mtime has not changed)" %
             filename)
-
-
-# Copy rate, 10KBps (1024b/100ms)
-SLOWCOPY_RATE = 1024
-
-
-class TrackerApplicationTest (TrackerWritebackTest):
-    def get_urn_count_by_url(self, url):
-        select = """
-        SELECT ?u WHERE { ?u nie:url \"%s\" }
-        """ % (url)
-        return len(self.tracker.query(select))
-
-    def get_test_image(self):
-        TEST_IMAGE = "test-image-1.jpg"
-        return TEST_IMAGE
-
-    def get_test_video(self):
-        TEST_VIDEO = "test-video-1.mp4"
-        return TEST_VIDEO
-
-    def get_test_music(self):
-        TEST_AUDIO = "test-music-1.mp3"
-        return TEST_AUDIO
-
-    def get_data_dir(self):
-        return self.datadir
-
-    def get_dest_dir(self):
-        return self.indexed_dir
-
-    def slowcopy_file_fd(self, src, fdest, rate=SLOWCOPY_RATE):
-        """
-        @rate: bytes per 100ms
-        """
-        log.debug("Copying slowly\n '%s' to\n '%s'", src, fdest.name)
-        fsrc = open(src, 'rb')
-        buffer_ = fsrc.read(rate)
-        while (buffer_ != b""):
-            fdest.write(buffer_)
-            time.sleep(0.1)
-            buffer_ = fsrc.read(rate)
-        fsrc.close()
-
-    def slowcopy_file(self, src, dst, rate=SLOWCOPY_RATE):
-        """
-        @rate: bytes per 100ms
-        """
-        fdest = open(dst, 'wb')
-        self.slowcopy_file_fd(src, fdest, rate)
-        fdest.close()
-
-    def setUp(self):
-        # Use local directory if available. Installation otherwise.
-        if os.path.exists(os.path.join(os.getcwd(),
-                                       "test-apps-data")):
-            self.datadir = os.path.join(os.getcwd(),
-                                        "test-apps-data")
-        else:
-            self.datadir = os.path.join(cfg.DATADIR,
-                                        "tracker-tests",
-                                        "test-apps-data")
-
-        super(TrackerApplicationTest, self).setUp()
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 4a312a012..7cada4794 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -101,8 +101,6 @@ functional_tests = [
   '311-fts-file-operations',
   '312-fts-stopwords',
   '410-extractor-decorator',
-  '600-applications-camera',
-  '601-applications-sync',
 ]
 
 if libcue.found()


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