-
Notifications
You must be signed in to change notification settings - Fork 5
PUT or PATCH on auxiliary resources #65
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
0828dc8
da22cc2
c42f209
fc235ee
122093b
5135713
7e1f551
eb11061
c53affa
b3aa723
6438952
6d76af0
32bc72f
b650f2f
d9c1dac
5fad293
7663498
3e43192
f7712ff
a3ed941
6f1282e
3127b7a
b53202b
0f86cc8
f5d5af1
094ab59
cd678c5
38b231c
747e156
6ef293b
b523083
c4f35ee
c8bbe65
87dd379
765326c
b0f8506
1a99ae4
c04107f
08431c5
5c8aa61
cea8290
d44f2cc
dba4f0d
49ea325
44219a9
009f613
61b518b
297dbaf
a2a1ff6
1a36a38
35e6a0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||||||||||
| Feature: PUT or PATCH on auxiliary resources | ||||||||||||||
|
|
||||||||||||||
| Background: Set up container and parse link headers | ||||||||||||||
| * def testContainer = rootTestContainer.createContainer() | ||||||||||||||
| * def container = testContainer.createContainer() | ||||||||||||||
| * def exampleTurtle = karate.readAsString('../fixtures/example.ttl') | ||||||||||||||
| * def rdfResource = testContainer.createResource('.ttl', exampleTurtle, 'text/turtle'); | ||||||||||||||
|
|
||||||||||||||
| Scenario: PUT auxiliary resource to container | ||||||||||||||
| * def response = clients.alice.sendAuthorized('GET', container.url, null, null) | ||||||||||||||
| * def links = parseLinkHeaders(response.headers) | ||||||||||||||
|
Comment on lines
+11
to
+12
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Why not use the normal GET? I know it is longer but I see no need for the special case of
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||||||||||||||
| * def describedby = links.find(el => el.rel.toLowerCase() === 'describedby') | ||||||||||||||
| * def metaUrl = resolveUri(container.url, describedby.uri) | ||||||||||||||
| Given url metaUrl | ||||||||||||||
| And headers clients.alice.getAuthHeaders('PUT', metaUrl) | ||||||||||||||
| And header Content-Type = 'text/turtle' | ||||||||||||||
kjetilk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| And request "<./> a <#Something> ." | ||||||||||||||
kjetilk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| When method PUT | ||||||||||||||
| Then status 201 | ||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.