-
Notifications
You must be signed in to change notification settings - Fork 4
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
PUT or PATCH on auxiliary resources #65
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks right but I can't read Karate :)
Is the representation body (the string) goes out as is or any transformation in place eg., baseURL being determined... and the body includes @base
or the URIs in the statements are updated.
The request that's going out is:
Content-Type: text/turtle; charset=UTF-8
but the Scenario here does not include charset. It seems to get added. Might want to look into this.
May also want to look into whether the servers can handle the charset properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is PATCH still to be added?
[EDIT] I missed the other comments from above so ignore this question
* def response = clients.alice.sendAuthorized('GET', container.url, null, null) | ||
* def links = parseLinkHeaders(response.headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* def response = clients.alice.sendAuthorized('GET', container.url, null, null) | |
* def links = parseLinkHeaders(response.headers) | |
Given url container.url | |
And headers clients.alice.getAuthHeaders('GET', container.url) | |
When method GET | |
* def links = parseLinkHeaders(responseHeaders) |
Why not use the normal GET? I know it is longer but I see no need for the special case of sendAuthorized()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that because I don't think of that as a test in its own right, that's just there to get the link. No strong opinions though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me and I have done similar elsewhere (e.g. every time we create a test container or resource). In this case, I wonder if we should provide overrides to the sendAuthorized
method so that there are simpler variants making the test easier to read. Let's discuss.
Did the change to the RDF being sent fix this? The reason the body appeared not to be sent is that Karate doesn't interpret it correctly and just doesn't show it. We have an issue open to improve this. The content length was 21 indicating it was sent. |
Co-authored-by: Pete Edwards <[email protected]>
Co-authored-by: Pete Edwards <[email protected]>
Co-authored-by: Pete Edwards <[email protected]>
Co-authored-by: Pete Edwards <[email protected]>
…ature Co-authored-by: Pete Edwards <[email protected]>
Test to see that a containment triple is deleted
Co-authored-by: Pete Edwards <[email protected]>
…tainer Test that server protects non-empty container
Test Allow headers for GET and HEAD
It appears that it is an unrelated bug in NSS that causes the NSS test failure, and I agree, the |
…ature Co-authored-by: Pete Edwards <[email protected]>
Test for POST to non-existing resource
Co-authored-by: Pete Edwards <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
The following test looks correct to me, but all three servers fail, so I guess not...
CSS and ESS do not appear to support description resources (and they not appear to be required by the spec, which may be an omission).
NSS fails with the following:
it may looks like the request body of the
PUT
request is not getting sent to the server, and I don't understand why. So, I push it so that others can have a look.Once this works, more tests for resources and also
PATCH
can be added.