Failed tests when running over Trinpod
Opened this issue · 5 comments
When I run tests over tinpod
got this result:
Test Suites: 5 failed, 2 passed, 7 total
Tests: 25 failed, 31 skipped, 13 passed, 69 total
Snapshots: 0 total
Time: 413.725 s
the result of actions on tests is very different from the expected results. this is one of them:
● Alice's pod › GET JSON-LD › As Turtle › Triples
expect(received).toEqual(expected) // deep equality
Expected: ArrayContaining [["<http://store.example.com/>", "<http://store.example.com/name>", "Links Bike Shop"], ["<http://store.example.com/>", "<http://store.example.com/description>", "The most \"linked\" bike store on earth!"], ["<http://store.example.com/>", "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>", "<http://store.example.com/Store>"]]
Received: [[Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array], [Array]]
Those conneg tests are quite fiddly, I think it's not a real problem.
What are the other tests that fail?
Yes, we have these errors in other tests also.
as an example in update.test.ts
:
● Update › Using PATCH to replace triple (same content) › updates the resource
expect(received).toEqual(expected) // deep equality
Expected: ArrayContaining [{"graph": {"classOrder": 5, "termType": "NamedNode", "value": "https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655447578570/exists/exists4.ttl"}, "object": {"classOrder": 5, "termType": "NamedNode", "value": "https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655447578570/exists/exists4.ttl#world"}, "predicate": {"classOrder": 5, "termType": "NamedNode", "value": "https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655447578570/exists/exists4.ttl#linked"}, "subject": {"classOrder": 5, "termType": "NamedNode", "value": "https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655447578570/exists/exists4.ttl#hello"}}]
Received: [[Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement], [Statement]]
And this is in delete.test.ts
:
`● Delete › non-empty container › leaves the resource
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 149
- Hello World
+ @base <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/exists/exists.txt> .
+ @prefix gmxo: <https://ontology.graphmetrix.com/node/> .
+ @prefix solid-tests: <https://solid-tests.stage.graphmetrix.net/node/> .
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ @prefix ttk-i: <https://ttk-i.stage.graphmetrix.net/node/> .
+ @prefix prov: <http://www.w3.org/ns/prov#> .
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ @prefix sio: <http://semanticscience.org/resource/> .
+ @prefix trinity: <https://trinity.graphmetrix.net/node/> .
+ @prefix solid: <http://www.w3.org/ns/solid/terms#> .
+ @prefix neo: <https://neo.graphmetrix.net/node/> .
+ @prefix ocds: <http://purl.org/onto-ocds/ocds#> .
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
+ @prefix ldp: <http://www.w3.org/ns/ldp#> .
+ @prefix as: <https://www.w3.org/ns/activitystreams#> .
+ @prefix event: <http://purl.org/NET/c4dm/event.owl#> .
+ @prefix schema: <http://schema.org/> .
+ @prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
+ @prefix gmx: <http://graphmetrix.com/node#> .
+ @prefix pico: <http://data.cochrane.org/ontologies/pico/> .
+ @prefix space: <http://www.w3.org/ns/pim/space#> .
+ @prefix tl: <http://purl.org/NET/c4dm/timeline.owl#> .
+ @prefix obo: <http://purl.obolibrary.org/obo/> .
+ @prefix pext: <http://www.ontotext.com/proton/protonext#> .
+ @prefix opmv: <http://purl.org/net/opmv/ns#> .
+ <https://solid-tests.stage.graphmetrix.net/>
+ neo:m_tag "/"^^<xsd:string> ;
+ ldp:contains <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/> ;
+ neo:m_last-change solid-tests:t_4o1 ;
+ a ldp:BasicContainer , solid:Account ;
+ rdfs:label "Solid-Tests: Storage"@en .
+ <https://solid-tests.stage.graphmetrix.net/i>
+ neo:m_tag "solid-tests"^^<xsd:string> ;
+ neo:m_last-change solid-tests:t_a4 ;
+ a neo:s_solid-user ;
+ solid:account <https://solid-tests.stage.graphmetrix.net/> ;
+ space:storage <https://solid-tests.stage.graphmetrix.net/> .
+ <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/>
+ neo:m_tag "solid-crud-tests-1655448253520"^^<xsd:string> ;
+ ldp:contains <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/exists/> ;
+ neo:m_last-change solid-tests:t_4o1 ;
+ a ldp:BasicContainer .
+ <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/exists/exists.txt>
+ neo:m_tag "exists.txt"^^<xsd:string> ;
+ a sio:SIO_000148 .
+ <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/exists/>
+ neo:m_tag "exists"^^<xsd:string> ;
+ ldp:contains <https://solid-tests.stage.graphmetrix.net/solid-crud-tests-1655448253520/exists/exists.txt> ;
+ neo:m_last-change solid-tests:t_4o1 ;
+ a ldp:BasicContainer .
+ sio:SIO_000148
+ neo:m_last-change solid-tests:t_a4 ;
+ a opmv:Artifact ;
+ rdfs:label "document"@en .
+ rdf:type rdfs:label "type"^^<xsd:string> .
+ trinity:t_2ac
+ neo:m_tag "f_solid-container-add"^^<xsd:string> ;
+ a neo:f_create , neo:e_result ;
+ rdfs:label "create container"@en , "create container"^^<xsd:string> .
+ neo:s_property rdfs:label "property"@en .
+ <https://solid-crud-tests-example-1.solidcommunity.net/profile/card#me>
+ a prov:Contributor ;
+ sio:SIO_000586 trinity:t_2ac .
+ ldp:BasicContainer
+ neo:m_last-change solid-tests:t_a4 ;
+ a opmv:Artifact ;
+ rdfs:label "BasicContainer"^^<xsd:string> .
+ neo:m_tag rdfs:label "trinTag"@en .
+ sio:SIO_000000 rdfs:label "Entity"@en .
+ neo:s_characteristic rdfs:label "characteristic"@en .
+ solid:Account
+ neo:m_cid "a_solid-account"^^<xsd:string> ;
+ neo:m_last-change solid-tests:t_a4 ;
+ a opmv:Artifact .
+ rdfs:label rdfs:label "Label"@en .
+ opmv:Artifact rdfs:label "Artifact"@en .
+ neo:substance rdfs:label "Substance"@en .
+ sio:SIO_000776 rdfs:label "Object"@en .
+ neo:e_result rdfs:label "Result"@en .
+ neo:f_function rdfs:label "function"@en .
+ neo:f_create
+ a neo:s_type ;
+ rdfs:label "create"@en .
+ solid-tests:t_a4
+ neo:t_end solid-tests:t_9 ;
+ neo:t_start solid-tests:t_9 ;
+ obo:OBI_0000308 ttk-i:t_9y ;
+ a event:Event , as:Create .
+ solid-tests:t_9
+ neo:i_function tl:at ;
+ neo:o_result "2022-06-10T07:23:54.483581-07:00"^^<xsd:dateTime> ;
+ a sio:SIO_000614 .
+ pext:User rdfs:label "User"^^<xsd:string> .
+ neo:s_member rdfs:label "Member"^^<xsd:string> .
+ solid-tests:t_4o1
+ neo:t_end solid-tests:t_4nn ;
+ neo:t_start solid-tests:t_4nn ;
+ obo:OBI_0000308 solid-tests:t_fu ;
+ a event:Event , as:Create .
+ solid-tests:t_4nn
+ neo:i_function tl:at ;
+ neo:o_result "2022-06-16T23:44:38.058385-07:00"^^<xsd:dateTime> ;
+ a sio:SIO_000614 .
+ neo:s_instance rdfs:label "Instance"^^<xsd:string> .
+ ldp:RDFSource rdfs:label "RDFSource"^^<xsd:string> .
+ neo:s_content rdfs:label "Content"@en .
+ neo:s_element rdfs:label "Element"@en .
+ space:Storage rdfs:label "Storage"@en .
+ pico:Condition rdfs:label "Condition"@en .
+ neo:s_group rdfs:label "Group"^^<xsd:string> .
+ ldp:Container rdfs:label "LDP Container"@en .
+ <https://trinity.graphmetrix.net/node/t_2p0>
+ neo:m_tag "f_solid-function"^^<xsd:string> ;
+ rdfs:label "solid protocol function"@en .
+ rdfs:Resource rdfs:label "Resource"^^<xsd:string> .
+ neo:s_solid-user neo:m_cid "s_solid-user"^^<xsd:string> .
+ prov:Contributor rdfs:label "Contributor"@en .
+ vcard:Group rdfs:label "Group"@en .
+ neo:y_system rdfs:label "System"@en .
+ neo:s_type rdfs:label "Type"@en .
+ schema:CreateAction rdfs:label "CreateAction"^^<xsd:string> .
+ neo:o_result rdfs:label "Result"@en .
+ schema:Action rdfs:label "Action"^^<xsd:string> .
+ neo:s_as-object-or-link rdfs:label "Activitystream Ontology Class"@en .
+ neo:e_time rdfs:label "Time"@en .
+ event:Event rdfs:label "Event"@en .
+ as:Activity rdfs:label "Activity"@en .
+ as:Create rdfs:label "Create"@en .
+ neo:s_as-activity-or-relationship neo:m_cid "s_as-activity-or-relationship"^^<xsd:string> .
+ neo:m_cid rdfs:label "Concept ID"@en .
+ foaf:Agent rdfs:label "Agent"^^<xsd:string> .
+ ocds:Change rdfs:label "Change"@en .
+ <https://ttk-i.stage.graphmetrix.net/i>
+ a prov:Contributor ;
+ rdfs:label "TrinServer™: stage.graphmetrix.net"^^<xsd:string> ;
+ sio:SIO_000586 trinity:t_rr .
+ sio:SIO_000380 rdfs:label "Container"@en .
+ neo:m_last-change rdfs:label "last change"@en .
+ trinity:t_rr
+ a neo:e_result ;
+ rdfs:label "make TrinPod™"^^<xsd:string> .
+ <https://trinity.graphmetrix.net/node/t_245>
+ neo:m_tag "f_trinserver-function"^^<xsd:string> ;
+ rdfs:label "TrinPod™ function"@en .
+ sio:SIO_000090 rdfs:label "specification"@en .
+ neo:s_ldp-user neo:m_cid "s_ldp-user"^^<xsd:string> .
+ neo:i_function rdfs:label "function"@en .
+
`
Bear in mind that TrinPod works with a data model in a different way to other implementations and is not file based. When you get a resource, you may get other triples with it related to its context in the larger data model. I don't think this is wrong but the issue is that the tests are using equality - making a false assumption about the expected response. If you confirm that the response contains the expected triples this should resolve a number of issues.
In general servers are allowed to add arbitrary triples to RDF resources. But in this particular case, a text/plain
resource was used - https://github.com/solid-contrib/solid-crud-tests/blob/3c2e966/test/surface/delete.test.ts#L130
We'll look into it in a few weeks, when the TrinPod team are ready (see https://gitter.im/solid/test-suite?at=62a9d1414e38f759e2bf741f)