@@ -10,6 +10,7 @@ Feature: With and without trailing slash cannot co-exist
1010 Given url childContainerUrl
1111 And headers clients.alice.getAuthHeaders('PUT' , childContainerUrl)
1212 And header Content-Type = 'text/turtle'
13+ And header Link = '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"'
1314 When method PUT
1415 Then assert responseStatus >= 200 && responseStatus < 300
1516
@@ -60,7 +61,7 @@ Feature: With and without trailing slash cannot co-exist
6061 And header Link = '<http://www.w3.org/ns/ldp#BasicContainer> ; rel="type" '
6162 When method POST
6263 Then assert responseStatus >= 200 && responseStatus < 300
63- And def childContainerUrl = karate.response.headerValues('location')[0]
64+ And def childContainerUrl = resolveUri(testContainer.url, karate.response.headerValues('location')[0])
6465 And assert childContainerUrl.endsWith('/')
6566
6667 # confirm there is no non-container resource with the same URI
@@ -87,7 +88,7 @@ Feature: With and without trailing slash cannot co-exist
8788 And request 'Hello'
8889 When method POST
8990 # this should either succeed (without using the slug) or fail as a conflict
90- Then assert (responseStatus > = 200 && responseStatus < 300 && karate.response.headerValues('location')[0] != resourceUrl) || [409, 415].includes(responseStatus)
91+ Then assert (responseStatus > = 200 && responseStatus < 300 && resolveUri(testContainer.url, karate.response.headerValues('location')[0]) != resourceUrl) || [409, 415].includes(responseStatus)
9192
9293 Scenario: POST resource, then try container with same name
9394 Given url testContainer.url
@@ -96,7 +97,7 @@ Feature: With and without trailing slash cannot co-exist
9697 And request 'Hello'
9798 When method POST
9899 Then assert responseStatus > = 200 && responseStatus < 300
99- And def resourceUrl = karate.response.headerValues('location')[0]
100+ And def resourceUrl = resolveUri(testContainer.url, karate.response.headerValues('location')[0])
100101 And assert !resourceUrl.endsWith('/')
101102
102103 # confirm there is no container with the same URI
@@ -122,6 +123,6 @@ Feature: With and without trailing slash cannot co-exist
122123 And header Link = '<http://www.w3.org/ns/ldp#BasicContainer> ; rel="type" '
123124 When method POST
124125 # this should either succeed (without using the slug) or fail as a conflict
125- Then assert (responseStatus >= 200 && responseStatus < 300 && karate.response.headerValues('location')[0] != resourceUrl + '/') || [409, 415].includes(responseStatus)
126+ Then assert (responseStatus >= 200 && responseStatus < 300 && resolveUri(testContainer.url, karate.response.headerValues('location')[0]) != resourceUrl + '/') || [409, 415].includes(responseStatus)
126127
127128# TODO: Evil test to check various suffices.
0 commit comments