Skip to content

Commit 85651ef

Browse files
authored
Add test to check GET,HEAD,OPTIONS are supported (#87)
1 parent cfdc8d4 commit 85651ef

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Ensure container created correctly on slash semantic tests.
66
* Update default test subjects for latest releases.
77
* For tests posting to a non-existent target, 405 is a valid response if target is not a container.
8+
* Add tests for support of read methods
89

910
## Release 0.0.11
1011
* Moved repository to `solid-contrib` organization.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Feature: Servers MUST support GET, HEAD and OPTIONS
2+
3+
Background: Set up container
4+
* def testContainer = rootTestContainer.createContainer()
5+
* def exampleTurtle = karate.readAsString('../fixtures/example.ttl')
6+
* def rdfResource = testContainer.createResource('.ttl', exampleTurtle, 'text/turtle');
7+
8+
Scenario: GET is supported for containers
9+
Given url testContainer.url
10+
When method GET
11+
Then assert responseStatus != 405 && responseStatus != 501
12+
13+
Scenario: GET is supported for resources
14+
Given url rdfResource.url
15+
When method GET
16+
Then assert responseStatus != 405 && responseStatus != 501
17+
18+
Scenario: HEAD is supported for containers
19+
Given url testContainer.url
20+
When method HEAD
21+
Then assert responseStatus != 405 && responseStatus != 501
22+
23+
Scenario: HEAD is supported for resources
24+
Given url rdfResource.url
25+
When method HEAD
26+
Then assert responseStatus != 405 && responseStatus != 501
27+
28+
Scenario: OPTIONS is supported for containers
29+
Given url testContainer.url
30+
When method OPTIONS
31+
Then assert responseStatus != 405 && responseStatus != 501
32+
33+
Scenario: OPTIONS is supported for resources
34+
Given url rdfResource.url
35+
When method OPTIONS
36+
Then assert responseStatus != 405 && responseStatus != 501

protocol/solid-protocol-test-manifest.ttl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,9 @@ manifest:cors-accept-acah
176176
spec:testScript
177177
<https://github.com/solid-contrib/specification-tests/blob/main/protocol/cors/accept-acah.feature> .
178178

179+
manifest:read-method-support
180+
a td:TestCase ;
181+
spec:requirementReference sopr:server-safe-methods ;
182+
td:reviewStatus td:unreviewed ;
183+
spec:testScript
184+
<https://github.com/solid-contrib/specification-tests/blob/main/protocol/read-write-resource/read-method-support.feature> .

0 commit comments

Comments
 (0)