Skip to content
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

Clean up run scripts #95

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
@prefix http: <http://www.w3.org/2007/ont/http#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_protected_ldp_bc.ttl#> .
@prefix dqm: <http://purl.org/dqm-vocabulary/v1/dqm#> .
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_protected_cont.ttl#> .

:test_list a test:FixtureTable ;
rdfs:comment "These tests exist to provide a high-level overview of allowed manipulations on an LDP-BC controlled by the ACL system with unspecified interaction model."@en ;
rdfs:comment "These tests exist to provide a high-level overview of allowed manipulations on a container controlled by the ACL system with unspecified interaction model."@en ;
test:fixtures (
:setup_init
:test_bob_r_bc
Expand Down Expand Up @@ -171,11 +172,10 @@
test:request :test_bob_bc_write_req ;
test:response_assertion :forbidden_res ;
]
# TODO: NSS returns 500 when patching container
# [
# test:request :test_bob_bc_patch_req ;
# test:response_assertion :ok_res ;
# ]
[
test:request :test_bob_bc_patch_req ;
test:response_assertion :ok_res ;
]
[
test:request :test_bob_bc_patch_with_delete_req ;
test:response_assertion :forbidden_res ;
Expand Down Expand Up @@ -249,18 +249,17 @@
test:request :test_bob_bc_write_req ;
test:response_assertion :forbidden_res ;
]
# TODO: NSS returns 500 when patching container
# [
# test:request :test_bob_bc_patch_req ;
# test:response_assertion :ok_res ;
# ]
[
test:request :test_bob_bc_patch_req ;
test:response_assertion :ok_res ;
]
[
test:request :test_bob_bc_patch_with_delete_req ;
test:response_assertion :forbidden_res ;
]
[
test:request :test_bob_bc_append_req ;
test:response_assertion :created_ok ;
test:response_assertion :created_ok_res ;
]
[
test:request :test_bob_bc_delete_req ;
Expand Down Expand Up @@ -323,20 +322,19 @@
]
[
test:request :test_bob_bc_write_req ;
test:response_assertion :created_res ; # TODO: Really?
]
# TODO: NSS returns 500 when patching container
# [
# test:request :test_bob_bc_patch_req ;
# test:response_assertion :ok_res ; # TODO: Check deletes
# ]
# [
# test:request :test_bob_bc_patch_with_delete_req ;
# test:response_assertion :ok_res ;
# ]
test:response_assertion :updated_ok_res ;
]
[
test:request :test_bob_bc_patch_req ;
test:response_assertion :ok_res ; # TODO: Check deletes
]
[
test:request :test_bob_bc_patch_with_delete_req ;
test:response_assertion :ok_res ;
]
[
test:request :test_bob_bc_append_req ;
test:response_assertion :created_ok ;
test:response_assertion :created_ok_res ;
]
[
test:request :test_bob_bc_other_req ;
Expand Down Expand Up @@ -436,7 +434,11 @@ WHERE { ?s a ?o . }""" ;
http:status 415 .

:deleted_ok_res a http:ResponseMessage ;
http:status 200 .
http:status "200|204"^^dqm:regex .

:updated_ok_res a http:ResponseMessage ;
http:status "200|204"^^dqm:regex .



:teardown a test:AutomatedTest ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
@prefix http: <http://www.w3.org/2007/ont/http#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_protected_ldp_nr.ttl#> .
@prefix dqm: <http://purl.org/dqm-vocabulary/v1/dqm#> .
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_protected_nonrdfsource.ttl#> .

:test_list a test:FixtureTable ;
rdfs:comment "These tests exist to provide a high-level overview of allowed manipulations on an LDP-NR controlled by the ACL system."@en ;
rdfs:comment "These tests exist to provide a high-level overview of allowed manipulations on a non-RDF source controlled by the ACL system."@en ;
test:fixtures (
:setup_init
:test_bob_r_nr
Expand Down Expand Up @@ -61,7 +62,7 @@
<#owner> a acl:Authorization;
acl:agent <https://alice.idp.test.solidproject.org/profile/card#me>;
acl:accessTo </test-auth-nr/alice_share_bob.txt>;
acl:mode acl:Read, acl:Write, acl:Control.
acl:mode acl:Read, acl:Write, acl:Control.
<#bob> a acl:Authorization;
acl:agent <https://bobwebid.idp.test.solidproject.org/profile/card#me>;
acl:accessTo </test-auth-nr/alice_share_bob.txt>;
Expand Down Expand Up @@ -126,7 +127,7 @@

:setup_alice_share_bob_a_nr_acl_req a http:RequestMessage ;
rdfs:comment "Set up ACL for Non-RDF resource for Bob to append.";
http:method "PUT" ;
http:method "PUT" ;
http:requestURI </test-auth-nr/alice_share_bob.txt.acl> ;
httph:content_type "text/turtle" ;
http:content """@prefix acl: <http://www.w3.org/ns/auth/acl#>.
Expand Down Expand Up @@ -169,7 +170,7 @@
]
[
test:request :test_bob_nr_append_req ;
test:response_assertion :not_found_res ; # TODO: Doesn't support hierarchy, should be :no_content_res ;
test:response_assertion :no_content_res ;
]
[
test:request :test_bob_nr_delete_req ;
Expand All @@ -194,7 +195,7 @@
test:request :setup_alice_share_bob_ar_nr_acl_req ;
test:response_assertion :created_ok_res
]
)
)
] .

:setup_alice_share_bob_ar_nr_acl_req a http:RequestMessage ;
Expand Down Expand Up @@ -227,7 +228,7 @@
[
test:request :test_bob_nr_head_req ;
test:response_assertion :ok_res ;
]
]
[
test:request :test_bob_nr_options_req ;
test:response_assertion :no_content_res ;
Expand All @@ -242,7 +243,7 @@
]
[
test:request :test_bob_nr_append_req ;
test:response_assertion :not_found_res ; # TODO: Doesn't support hierarchy, should be :no_content_res ;
test:response_assertion :no_content_res ;
]
[
test:request :test_bob_nr_delete_req ;
Expand Down Expand Up @@ -305,15 +306,15 @@
]
[
test:request :test_bob_nr_write_req ;
test:response_assertion :created_res ; # TODO: Really?
test:response_assertion :updated_ok_res ;
]
[
test:request :test_bob_nr_patch_req ;
test:response_assertion :unsupported_media_type_res ;
]
[
test:request :test_bob_nr_append_req ;
test:response_assertion :not_found_res ; # TODO: Doesn't support hierarchy, should be :no_content_res ;
test:response_assertion :no_content_res ;
]
[
test:request :test_bob_nr_other_req ;
Expand Down Expand Up @@ -430,7 +431,10 @@
http:status 415 .

:deleted_ok_res a http:ResponseMessage ;
http:status 200 .
http:status "200|204"^^dqm:regex .

:updated_ok_res a http:ResponseMessage ;
http:status "200|204"^^dqm:regex .


:teardown a test:AutomatedTest ;
Expand Down Expand Up @@ -460,7 +464,7 @@
http:requestURI </test-auth-nr/alice_share_bob.txt> .

:teardown_alice_share_bob_acl_req a http:RequestMessage ;
rdfs:comment "Open issue: https://github.com/solid/specification/issues/58"@en ; # TODO, we should have a predicate for this... :-)
rdfs:comment "Open issue: https://github.com/solid/specification/issues/58"@en ; # TODO, we should have a predicate for this... :-)
http:method "DELETE" ;
http:requestURI </test-auth-nr/alice_share_bob.txt.acl> .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
@prefix http: <http://www.w3.org/2007/ont/http#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_protected_ldp_rs.ttl#> .
@prefix dqm: <http://purl.org/dqm-vocabulary/v1/dqm#> .
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_protected_rdfsource.ttl#> .

:test_list a test:FixtureTable ;
rdfs:comment "These tests exist to provide a high-level overview of allowed manipulations on an LDP-RS controlled by the ACL system."@en ;
rdfs:comment "These tests exist to provide a high-level overview of allowed manipulations on an RDF Source controlled by the ACL system."@en ;
test:fixtures (
:setup_init
:test_bob_r_rs
Expand Down Expand Up @@ -179,7 +180,7 @@
]
[
test:request :test_bob_rs_append_req ;
test:response_assertion :not_found_res ; # TODO: Doesn't support hierarchy, should be :no_content_res ;
test:response_assertion :no_content_res ;
]
[
test:request :test_bob_rs_delete_req ;
Expand Down Expand Up @@ -318,7 +319,7 @@
]
[
test:request :test_bob_rs_write_req ;
test:response_assertion :created_res ; # TODO: Really?
test:response_assertion :updated_ok_res ;
]
[
test:request :test_bob_rs_patch_req ;
Expand All @@ -330,7 +331,7 @@
]
[
test:request :test_bob_rs_append_req ;
test:response_assertion :not_found_res ; # TODO: Doesn't support hierarchy, should be :no_content_res ;
test:response_assertion :no_content_res ;
]
[
test:request :test_bob_rs_other_req ;
Expand Down Expand Up @@ -458,8 +459,10 @@ WHERE { ?s a ?o . }""" ;
http:status 415 .

:deleted_ok_res a http:ResponseMessage ;
http:status 200 .
http:status "200|204"^^dqm:regex .

:updated_ok_res a http:ResponseMessage ;
http:status "200|204"^^dqm:regex .

:teardown a test:AutomatedTest ;
test:purpose "Delete resources that were set up in these tests"@en ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@prefix : <https://github.com/solid/test-suite/blob/master/testers/rdf-fixtures/fixture-tables/operations_put_resource.ttl#> .

:test_list a test:FixtureTable ;
rdfs:comment "These tests exist to provide a high-level overview of allowed PUT manipulations on different resources with unspecified interaction model."@en ;
rdfs:comment "These tests exist to provide a high-level overview of allowed PUT manipulations on different resources with unspecified interaction model."@en ;
test:fixtures (
:create_containers
# :teardown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

=head1 PURPOSE

Testing HTTP interface functionality of a Solid server
Testing HTTP interface authentication and authorization functionality with of a Solid server

=head1 ENVIRONMENT

Expand All @@ -22,7 +22,7 @@ Kjetil Kjernsmo E<lt>[email protected]<gt>.

=head1 COPYRIGHT AND LICENCE

This software is Copyright (c) 2019 by Inrupt Inc.
This software is Copyright (c) 2020 by Inrupt Inc.

This is free software, licensed under:

Expand All @@ -43,13 +43,29 @@ BEGIN {
$ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = 'IO::Socket::SSL';
}


my $path = $ENV{SOLID_FIXTURE_PATH} || '/opt/fixture-tables/';

use Test::FITesque::RDF;

my @files = qw(
authentication.ttl
http-put-check-acl.ttl
operations_protected_cont.ttl
operations_protected_nonrdfsource.ttl
operations_protected_rdfsource.ttl
);


BAIL_OUT("Set SOLID_REMOTE_BASE to the URL of the base of the server you are testing") unless $ENV{SOLID_REMOTE_BASE};

my $suite = Test::FITesque::RDF->new(source => $path . 'http-put-check-acl.ttl', base_uri => $ENV{SOLID_REMOTE_BASE})->suite;

my $suite = Test::FITesque::Suite->new;

foreach my $file (@files) {
note("Reading tests from $path$file");
$suite->add(Test::FITesque::RDF->new(source => $path . $file, base_uri => $ENV{SOLID_REMOTE_BASE})->suite);
}

$suite->run_tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Kjetil Kjernsmo E<lt>[email protected]<gt>.

=head1 COPYRIGHT AND LICENCE

This software is Copyright (c) 2019 by Inrupt Inc.
This software is Copyright (c) 2020 by Inrupt Inc.

This is free software, licensed under:

Expand All @@ -48,7 +48,11 @@ my $path = $ENV{SOLID_FIXTURE_PATH} || '/opt/fixture-tables/';

use Test::FITesque::RDF;

my @files = ('authentication.ttl','operations_protected_ldp_nr.ttl','operations_protected_ldp_rs.ttl');
my @files = qw(
operations_post_with_slug.ttl
operations_put_resource.ttl
operations_put_container.ttl
);


BAIL_OUT("Set SOLID_REMOTE_BASE to the URL of the base of the server you are testing") unless $ENV{SOLID_REMOTE_BASE};
Expand Down