-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xAPI 2.0 Compatibility + Test Directory #252
Conversation
@Argenrost @vbhayden You might want to look at the testing for |
Some tests also now seem to expect an |
Thanks for the heads up Milt! |
The changes look good for setting the headers! I'm now running into an issue when I try to make an LRS that is backwards compatible with 1.0.x: It looks like there's a test that tries to ensure the alternate request syntax is not accepted, but does not itself send an X-Experience-Api-Version header for There was no XAPI-XXXX code for the fail but it did give me the loc+line: |
Better late than never, hopefully fixed with 46d4ee0 Thanks Milt! |
Hi Trey! {
"name": "console",
"owner": null,
"flags": {
"endpoint": "http://localhost:8080/xapi"
},
"options": {},
"rollupRule": "mustPassAll",
"uuid": "4f291c65-e984-44d3-8bce-e2a7460bf264",
"startTime": 1685984406843,
"endTime": 1685984407328,
"duration": 485,
"state": "finished",
"summary": {
"total": 1408,
"passed": 28,
"failed": 1,
"version": "2.0.0.0"
},
"log": {
"title": "",
"name": "",
"requirement": "",
"log": "REQUEST SUPERREQUEST\n_______________________________________\nPOST /xapi/statements HTTP/1.1\r\nX-Experience-API-Version: 2.0.0\r\nhost: localhost:8080\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 324\r\nConnection: close\r\n\r\n{\"actor\":{\"objectType\":\"Agent\",\"name\":\"xAPI mbox\",\"mbox\":\"mailto:[email protected]\"},\"verb\":{\"id\":\"http://adlnet.gov/expapi/verbs/attended\",\"display\":{\"en-GB\":\"attended\",\"en-US\":\"attended\"}},\"object\":{\"objectType\":\"Activity\",\"id\":\"http://www.example.com/meetings/occurances/34534\"},\"id\":\"b1c28439-90c8-4f2d-8db2-7455c9225e38\"}\n\nRESPONSE SUPERREQUEST\n_______________________________________\nHTTP/1.1 200 OK\nconnection: close\ndate: Mon, 05 Jun 2023 17:00:06 GMT\nx-experience-api-consistent-through: 2023-06-05T17:00:06.947459000Z\nx-experience-api-version: 2.0.0\ncontent-type: application/json;charset=utf-8\n\nb1c28439-90c8-4f2d-8db2-7455c9225e38\n=======================================\nREQUEST SUPERREQUEST\n_______________________________________\nGET /xapi/statements?statementId=b1c28439-90c8-4f2d-8db2-7455c9225e38 HTTP/1.1\r\nX-Experience-API-Version: 2.0.0\r\nhost: localhost:8080\r\nConnection: close\r\n\r\nRESPONSE SUPERREQUEST\n_______________________________________\nHTTP/1.1 200 OK\nconnection: close\ndate: Mon, 05 Jun 2023 17:00:06 GMT\nx-experience-api-consistent-through: 2023-06-05T17:00:06.970985000Z\nx-experience-api-version: 2.0.0\ncontent-type: application/json;charset=utf-8\n\n{\"actor\":{\"objectType\":\"Agent\",\"name\":\"xAPI mbox\",\"mbox\":\"mailto:[email protected]\"},\"verb\":{\"id\":\"http://adlnet.gov/expapi/verbs/attended\",\"display\":{\"en-GB\":\"attended\",\"en-US\":\"attended\"}},\"object\":{\"objectType\":\"Activity\",\"id\":\"http://www.example.com/meetings/occurances/34534\"},\"id\":\"b1c28439-90c8-4f2d-8db2-7455c9225e38\",\"stored\":\"2023-06-05T17:00:06.940355000Z\",\"timestamp\":\"2023-06-05T17:00:06.940355000Z\",\"authority\":{\"name\":\"Memory LRS\",\"objectType\":\"Agent\",\"account\":{\"name\":\"root\",\"homePage\":\"http://localhost:8080\"}},\"version\":\"2.0.0\"}\n=======================================\n",
"status": "failed",
"tests": [
{
"title": "(4.2.7) Concurrency",
"name": "",
"requirement": "4.2.7",
"log": "",
"status": "failed",
"tests": [
{
"title": "xAPI uses HTTP 1.1 entity tags (ETags) to implement optimistic concurrency control in the following resources, where PUT, POST or DELETE are allowed to overwrite or remove existing data.",
"name": "xAPI uses HTTP 1.1 entity tags (ETags) to implement optimistic concurrency control in the following resources, where PUT, POST or DELETE are allowed to overwrite or remove existing data.",
"requirement": "",
"log": "",
"status": "failed",
"tests": [
{
"title": "Concurrency for the Activity State Resource.",
"name": "Concurrency for the Activity State Resource.",
"requirement": "",
"log": "",
"status": "failed",
"tests": [
{
"title": "If a PUT request is received without either header for a resource that already exists",
"name": "If a PUT request is received without either header for a resource that already exists",
"requirement": "",
"log": "",
"status": "failed",
"tests": [
{
"title": "Return 409 conflict",
"name": "Return 409 conflict",
"requirement": "",
"log": "",
"status": "failed",
"error": "AssertionError: expected 204 to equal 409",
"tests": []
}
]
}
]
}
]
}
]
}
]
}
} I'm adding some extra instrumentation to my test LRS to see if I can figure out more, but let me know if this makes any sense to you. |
Morning @milt, just now seeing this -- been a long summer. There were issues with the ETag tests and timing due to the introduction of a few async calls being attributed to the wrong requirement. They should all be fine now, but let me know if they're still misbehaving for you. |
This update adds xAPI 2.0 compatibility to the conformance test suite.