summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Add more tests for cast and xpath functionsCarlos Garnacho2022-03-137-0/+9
|
* tests: Add more SPARQL builtin function testsCarlos Garnacho2022-03-1355-0/+190
|
* tests: Prepare SPARQL tests for cursor errorsCarlos Garnacho2022-03-131-5/+5
| | | | | | | In the tests that we do expect errors, we might get them after next(). Adjust the "expected query failure" checks so it covers the errors produced both when creating or when iterating a cursor.
* tests: Add tests for FTS functionsCarlos Garnacho2022-03-1325-0/+82
| | | | Test behavior and output of FTS rank/offsets/snippet functions.
* tests: Test locally mapped connections in the services testsCarlos Garnacho2022-02-101-4/+32
| | | | | Also relate the 2 connections via tracker_sparql_connection_map_connection so we can test the "private:xyz" special URIs.
* tests: Generalize service tests so we can specify full URIsCarlos Garnacho2022-02-1012-14/+17
| | | | | These were made to test DBus services, generalize them a bit so we can use it to test other URI types.
* libtracker-sparql: Add TrackerSerializeFlags argument to serialization APICarlos Garnacho2022-02-041-0/+2
| | | | | This is currently unused, but might be used for future expansion points (e.g. hint the desire for pretty RDF)
* libtracker-data: Forward annotated column types on DESCRIBE queriesCarlos Garnacho2022-02-046-11/+11
| | | | | | | | | All of subject/predicate/graph are ensured to always be resources, the only variable type is the object, which is fetched from the tracker_triples table directly. Since this involves changes (towards better) in the interpretation of RDF data for our serialization tests, update these as well.
* tests: Add serialize testsCarlos Garnacho2022-02-0418-0/+579
| | | | Test both connection and statement serialization API
* libtracker-data: Provide graph information at describe queriesCarlos Garnacho2022-02-044-44/+44
| | | | | | | And ensure ordering by first subject then graph, so information for a single resource from multiple graphs is clustered together. Since the cursor format and output changed, update the tests that expect a specific DESCRIBE output.
* tests: Do not leak TrackerSparqlStatementsCarlos Garnacho2021-11-131-0/+1
| | | | Also exercise those finalize paths.
* tests: Add tests for remote TrackerSparqlStatementsCarlos Garnacho2021-11-131-2/+10
| | | | | Use the same infrastructure to also test statements with a remote TrackerSparqlConnection/TrackerEndpoint.
* tests: Really test TrackerSparqlStatement on all connectionsCarlos Garnacho2021-11-111-9/+17
| | | | | | | | | | Since we were using the static TestInfo structs to hold the connection, we were simply overwriting it in a loop when adding the tests. This made just the last TrackerSparqlConnection (dbus) to be tested. Separate this bit, and pass new memory to each individual test, so they are ensured to use the intended connection. This makes the direct TrackerSparqlStatement explicitly tested as well.
* Merge branch 'wip/carlosg/zero-or-more-fix' into 'master'Sam Thursfield2021-11-075-0/+14
|\ | | | | | | | | | | | | libtracker-sparql: Fix actual 0-path matches in ? and * path operators Closes #337 See merge request GNOME/tracker!472
| * tests: Add tests for +/? property path operator finding 0-length resultsCarlos Garnacho2021-11-075-0/+14
| | | | | | | | | | These should also bring back the 0-length result even if there are no further results.
* | tests: Add tests for loading statements from resourcesCarlos Garnacho2021-11-063-12/+51
|/ | | | | | Include most tests in a GResource, and run those from there in addition to the tracker_sparql_connection_query_statement() API, so we additionally test loading from resources.
* Merge branch 'fix-float-cmp-in-test' into 'master'Carlos Garnacho2021-10-161-1/+1
|\ | | | | | | | | | | | | [test] Refactor double/float comparison on tests Closes #332 See merge request GNOME/tracker!469
| * [test] Refactor double comparisonFabián Heredia Montiel2021-10-151-1/+1
| | | | | | | | | | | | | | Fixes https://gitlab.gnome.org/GNOME/tracker/-/issues/332 There were some issues downstreams were the equality comparison failed on some platforms like i686
* | add test for the parsing erros that printed while parsing the ontologyAbanoub Ghadban2021-10-054-1/+188
| | | | | | | | | | The parsing errors that printed should be stored in a file that has the extension .errors.out. The test works by inspecting the error messages that printed using g_printerr() and compare them with the expected error messages that stored in *.errors.out file.
* | DomainIndexAddTest: fix problem of using multipe value property as a domain ↵Abanoub Ghadban2021-10-052-5/+5
| | | | | | | | | | | | | | | | index DomainIndexAddTest was using test:a_n_cardinality property as a domain index which is not supported in tracker. Only single value properties can be used as a domain index. So, it used test:a_int property instead of test:a_n_cardinality as the domain index for class test:C.
* | add test for handling incomplete property error in the ontologyAbanoub Ghadban2021-10-053-0/+18
| |
* | make ontology-error test use regular expressions instead of strcmpAbanoub Ghadban2021-10-051-1/+11
|/
* libtracker-data: Ensure tracker:id/uri can only look up allowed graphsCarlos Garnacho2021-08-261-0/+20
| | | | | Check with the per-graph Refcount table whether the ROWID involved is used in any allowed graph. Return 0/null otherwise.
* ontolog-changes.py: mark some tests as expected failureAbanoub Ghadban2021-08-101-6/+16
| | | | Replaced @ut.skip() by @ut.expectedFailure notation for tests that are not supported by tracker yet.
* ontology-changes.py: prevent some tests from being skippedAbanoub Ghadban2021-08-101-4/+3
| | | | | There were some tests that were skipped in ontology-changes.py file (most likely because tracker was not support them when they are written). The @ut.skip notation is removed from the tests that are supported by tracker now.
* add a test case for ontology rollback on failureAbanoub Ghadban2021-08-1010-0/+529
| | | | | | | The test case works by trying to create a database with a malformed ontology. Hence, the connection is expected to fail and no database is created. Then, a new connection is created with a valid ontology. Hence, we ensure that the database is build correctly and it is not affected by the malformed ontology. The next step is trying to update the ontology using another malformed ontology. It is expected to fail and the db is rolled back to its previous consistent state. Finally, the database is updated using a valid ontology and we make sure that it is updated successfully without being affected by the malformed ontology update.
* Merge branch 'make_ontology_parsing_warnings_clearer' into 'master'Sam Thursfield2021-07-129-0/+206
|\ | | | | | | | | Track current line and column numbers and handle missing prefix error See merge request GNOME/tracker!447
| * test-movie.ttl: fixed missing prefix errorAbanoub Ghadban2021-07-121-0/+1
| |
| * add test cases for ontology errorAbanoub Ghadban2021-07-128-0/+205
| |
* | tests: Disable GVFS in functional testsCarlos Garnacho2021-07-051-0/+1
|/ | | | | | | | | | | | | | | | On some of these tests, we create a per-testcase dbus environment, thus rely on g_bus_get*() default connections to be correctly tear down and created again for the next testcase. GVFS does not seem to play along with this, and keeps the default GDBusConnections alive between runs. This may fail with "Connection already closed" if we attempted to get a default session/system bus on later testcases, since the dbus daemon is actually tear down. We actually don't need to pull GVFS here at all, so disable it for our testcases to tiptoe the issue. Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/314
* add tests for feature of supporting comments in ontology filesAbanoub Ghadban2021-06-225-0/+55
| | | | | | There are no special tests that should be carried out to test the feature of skipping comments in ontology file. Just we need to use any ontology file that contains different types of comments and make sure that the ontology is parsed well. That is done by applying different queries on the database created and make sure that the queries return the right data which means that the schema is parsed successfully.
* Merge branch 'wip/carlosg/datetime-comparisons' into 'master'Carlos Garnacho2021-06-0814-0/+64
|\ | | | | | | | | Fixes to xsd:dateTime relational expressions See merge request GNOME/tracker!402
| * tests: add test for binding a string to a xsd:dateTime via ↵Rasmus Thomsen2021-05-083-0/+8
| | | | | | | | TrackerSparqlStatement
| * tests: Add tests for xsd:dateTime comparisons in FILTERCarlos Garnacho2021-05-0811-0/+56
| |
* | Merge branch 'wip/carlosg/ci-playground' into 'master'Sam Thursfield2021-05-263-3/+3
|\ \ | | | | | | | | | | | | CI improvements See merge request GNOME/tracker!430
| * | ci: Add test timeout multiplierCarlos Garnacho2021-05-163-3/+3
| | | | | | | | | | | | | | | So we can expand test timeouts in CI without making it horribly slow on the desktop.
* | | Removed DataFixture typedefnitinosiris2021-05-231-66/+63
| | |
* | | Removed typecast warningsnitinosiris2021-05-201-3/+1
|/ /
* | tests: Fix ging vs guint comparisonsDaniele Nicolodi2021-05-081-3/+3
| |
* | treewide: Fix signed vs unsigned comparison in loop index variablesDaniele Nicolodi2021-05-085-5/+5
|/
* Merge branch 'datetime-helpers' into 'master'Carlos Garnacho2021-05-084-5/+30
|\ | | | | | | | | | | | | Datetime helpers Closes #270 See merge request GNOME/tracker!381
| * libtracker-sparql: Add datetime helpers for statements and cursornis1302021-04-153-3/+17
| | | | | | | | | | | | | | Currently one needs to convert the datetime manually to a string now GDateTime value can be easily binded to a statement Fixes #270
| * tracker-resource: add datetime helpernis1302021-04-151-2/+13
| | | | | | | | | | | | Add tracker_resource_add_datetime, tracker_resource_set_datetime, tracker_resource_get_first_datetime and also includ tests for the above mentioned functions in tracker-resource-test.c
* | tests: Add another test for SERVICE being unioned with local dataCarlos Garnacho2021-05-013-0/+25
| | | | | | | | | | This tests the other way around, to ensure we still match URNs as strings on both sides.
* | Make tracker:endpoint test work on macOSDaniele Nicolodi2021-04-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symptom on my system are that the test fails to run because gi cannot find the shared library object for Tracker. This is due to the fact that $LD_LIBRARY_PATH is set by Meson but removed from the environment by the time the test is running. This is because the examples/python/endpoint.py scripts which uses '!#/usr/bin/env python' as a shebang and on macOS the env utility removes dynamic linker variables from the environment. Fix this by explicitly using python to execute the script. Use this opportunity for restructure how the Python installation and executable is looked up in the build definition: use the 'python' Meson module to lock for a suitable python in the main meson.build. Also, the test setup does not set $TRACKER_LANGUAGE_STOP_WORDS_DIR to point to the stop words directory in the source directory. Fix it.
* | Merge branch 'fix-fixtures' into 'master'Sam Thursfield2021-04-191-6/+6
|\ \ | | | | | | | | | | | | Fix Python test fixtures to run on macOS See merge request GNOME/tracker!409
| * | Fix Python test fixtures to run on macOSDaniele Nicolodi2021-04-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | On macOS the default start method for multiprocessing processes is spawn which makes dynamic modification of the code passed to the worker processes (the addition of the tmpdir member in this case) problematic. The issue is esily solved passing the tmpdir to the worker function as a parameter.
* | | Merge branch 'tap-dep' into 'master'Sam Thursfield2021-04-191-7/+10
|\ \ \ | | | | | | | | | | | | | | | | Look for a Python installation with the tap module See merge request GNOME/tracker!410
| * | | Look for a Python installation with the tap moduleDaniele Nicolodi2021-04-181-7/+10
| |/ / | | | | | | | | | | | | | | | When the TAP test protocol is enabled, look for a Python installation that has the tap module installed. This uses the 'python' Meson module and thus bumping the minimum Meson version to 0.51.
* | | Merge branch 'wip/carlosg/tap-checks-fix' into 'master'Sam Thursfield2021-04-192-2/+2
|\ \ \ | |/ / |/| | | | | | | | tests: Look for trueness of TEST_TAP_ENABLED See merge request GNOME/tracker!394