[tracker-miners/functional-tests-depends-checks: 1/4] functional-tests: Check for ISO image tags only if libosinfo is available
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/functional-tests-depends-checks: 1/4] functional-tests: Check for ISO image tags only if libosinfo is available
- Date: Tue, 17 Sep 2019 23:08:07 +0000 (UTC)
commit 0b30daad910ca81be9eb915d559442d752d8f212
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Aug 22 16:48:06 2019 +0200
functional-tests: Check for ISO image tags only if libosinfo is available
test-image-1 was checking for the presency of image tags that are added only
when libosinfo is found.
However the test case checks for them in all the cases, so split the image-1
test in two extractor tests, where one is doing the standard checks and another
one is only checking the tags provided by libosinfo
tests/functional-tests/meson.build | 4 ++++
.../images/test-image-1-iso-tags.expected.json | 12 ++++++++++++
.../test-extraction-data/images/test-image-1.expected.json | 4 ----
3 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 873f7363b..70f95b96a 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -32,6 +32,10 @@ if get_option('unzip_ps_gz_files')
extractor_tests += 'office/psgz-doc'
endif
+if libosinfo.found()
+ extractor_tests += 'images/test-image-1-iso-tags'
+endif
+
functional_tests = [
'300-miner-basic-ops',
'301-miner-resource-removal',
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1-iso-tags.expected.json
b/tests/functional-tests/test-extraction-data/images/test-image-1-iso-tags.expected.json
new file mode 100644
index 000000000..37b8a65d9
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/test-image-1-iso-tags.expected.json
@@ -0,0 +1,12 @@
+{
+ "test": {
+ "Filename": "test-image-1.jpg",
+ "Comment": "Basic jpeg example, ISO image tags checks"
+ },
+ "metadata": {
+ "nao:hasTag": [
+ { "nao:prefLabel": "test" },
+ { "nao:prefLabel": "tracker" }
+ ]
+ }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1.expected.json
b/tests/functional-tests/test-extraction-data/images/test-image-1.expected.json
index 4b5043d5f..a13ee20cf 100644
--- a/tests/functional-tests/test-extraction-data/images/test-image-1.expected.json
+++ b/tests/functional-tests/test-extraction-data/images/test-image-1.expected.json
@@ -7,10 +7,6 @@
"@type": "nmm:Photo",
"nfo:width": "699",
"nfo:height": "464",
- "nao:hasTag": [
- { "nao:prefLabel": "test" },
- { "nao:prefLabel": "tracker" }
- ],
"nie:title": "Kid",
"nmm:fnumber": "5.0",
"nmm:focalLength": "5.0",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]