[tracker-miners: 1/3] tests: Adapt result expectations of miner-basic functional test
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners: 1/3] tests: Adapt result expectations of miner-basic functional test
- Date: Sun, 19 Dec 2021 19:30:05 +0000 (UTC)
commit c14d5f9c97429b2564590e430092c8b1a33c7d04
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Dec 19 19:57:16 2021 +0100
tests: Adapt result expectations of miner-basic functional test
We are going to add nie:InformationElement data in multiple graphs for
the indexed folders, this breaks some checks done in the miner-basic
test where only one URN result is expected when querying on unrestricted
graphs. Use DISTINCT here so we still catch leftover data.
tests/functional-tests/miner-basic.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/functional-tests/miner-basic.py b/tests/functional-tests/miner-basic.py
index 501d079c9..83d4c253f 100755
--- a/tests/functional-tests/miner-basic.py
+++ b/tests/functional-tests/miner-basic.py
@@ -109,8 +109,9 @@ class MinerCrawlTest(fixtures.TrackerMinerTest):
def __get_file_urn(self, filepath):
result = self.tracker.query("""
- SELECT nie:interpretedAs(?u) WHERE {
+ SELECT DISTINCT ?ia WHERE {
?u a nfo:FileDataObject ;
+ nie:interpretedAs ?ia ;
nie:url \"%s\" .
}
""" % (self.uri(filepath)))
@@ -365,7 +366,6 @@ class MinerCrawlTest(fixtures.TrackerMinerTest):
directory_uri = self.uri("test-monitored")
directory = self.path("test-monitored")
document = self.path("test-monitored/unrelated.txt")
- resource_id = self.tracker.get_content_resource_id(directory_uri)
urn = self.__get_file_urn(directory)
with self.await_document_inserted(document) as resource:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]