1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
@prefix test: <http://ontologi.es/doap-tests#> .
@prefix deps: <http://ontologi.es/doap-deps#>.
@prefix dc: <http://purl.org/dc/terms/> .
@prefix httph:<http://www.w3.org/2007/ont/httph#> .
@prefix http: <http://www.w3.org/2007/ont/http#> .
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
<#test-list> a test:FixtureTable ;
test:fixtures ( <#public-writeread-unauthn-alt> <#public-cors-origin-set> ).
<#public-writeread-unauthn-alt> a test:AutomatedTest ;
test:purpose "More elaborate HTTP vocab for PUT then GET test"@en ;
test:test_script <http://example.org/httplist#http_req_res_list_unauthenticated> ;
test:params [
test:steps (
[
test:request <#public-writeread-unauthn-alt-put-req> ;
test:response_assertion <#public-writeread-unauthn-alt-put-res>
]
[
test:request <#public-writeread-unauthn-alt-get-req> ;
test:response_assertion <#public-writeread-unauthn-alt-get-res>
]
)
] .
<#public-writeread-unauthn-alt-put-req> a http:RequestMessage ;
http:method "PUT" ;
httph:content_type "text/turtle" ;
http:content "</public/foobar.ttl#dahut> a <http://example.org/Cryptid> ." ;
http:requestURI </public/foobar.ttl> .
<#public-writeread-unauthn-alt-put-res> a http:ResponseMessage ;
http:status 201 .
<#public-writeread-unauthn-alt-get-req> a http:RequestMessage ;
http:method "GET" ;
http:requestURI </public/foobar.ttl> .
<#public-writeread-unauthn-alt-get-res> a http:ResponseMessage ;
httph:content_type "text/turtle" .
<#public-cors-origin-set> a test:AutomatedTest ;
test:purpose "Testing CORS header when Origin is supplied by client"@en ;
test:test_script <http://example.org/httplist#http_req_res_list_unauthenticated> ;
test:params [
test:steps (
[
test:request <#public-cors-origin-set-req> ;
test:response_assertion <#public-cors-origin-set-res>
]
)
] .
<#public-cors-origin-set-req> a http:RequestMessage ;
http:method "GET" ;
httph:origin <https://app.example> ;
http:requestURI </public/verypublic/foobar.ttl> .
<#public-cors-origin-set-res> a http:ResponseMessage ;
http:status 200 ;
httph:access_control_allow_origin <https://app.example> ;
httph:content_type "text/turtle" .
<http://example.org/httplist#http_req_res_list_unauthenticated> a nfo:SoftwareItem ;
deps:test-requirement "Internal::Fixture::HTTPList"^^deps:CpanId ;
nfo:definesFunction "http_req_res_list_unauthenticated" .
|