Exemple #1
0
    def setUp(self):
        # We must create the test data before the miner does its
        # initial crawl, or it may miss some files due
        # https://gitlab.gnome.org/GNOME/tracker-miners/issues/79.
        monitored_files = self.create_test_data()

        try:
            # Start the miner.
            fixtures.TrackerMinerTest.setUp(self)

            for tf in monitored_files:
                url = self.uri(tf)
                self.tracker.ensure_resource(
                    fixtures.DOCUMENTS_GRAPH,
                    f"a nfo:Document ; nie:isStoredAs <{url}>",
                    timeout=cfg.AWAIT_TIMEOUT)
        except Exception:
            cfg.remove_monitored_test_dir(self.workdir)
            raise

        logging.info("%s.setUp(): complete", self)
Exemple #2
0
 def tearDown(self):
     self.sandbox.stop()
     cfg.remove_monitored_test_dir(self.workdir)