Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

[WIP] Adding solid test suite to GitHub actions #19

Merged
merged 5 commits into from
Sep 2, 2023

Conversation

mrvahedi68
Copy link

Added solid test suite into the Github actions.

Signed-off-by: MohammadReza vahedi <[email protected]>
Signed-off-by: MohammadReza vahedi <[email protected]>
@michielbdejong michielbdejong marked this pull request as draft August 30, 2023 07:35
@michielbdejong michielbdejong mentioned this pull request Aug 30, 2023
@michielbdejong
Copy link
Member

Currently when you try to run ./test/surface/run-solid-test-suite.sh interactively, you run into the following error:

docker exec -it thirdparty sh
/community-server #
/community-server # apk add --no-cache curl
[...]
/community-server # curl  http://server:3000/.well-known/openid-configuration 
InternalServerError: The identifier http://server:3000/.well-known/openid-configuration is outside the configured identifier space.
    at OriginalUrlExtractor.handle (/community-server/dist/http/input/identifier/OriginalUrlExtractor.js:53:19)
    at OriginalUrlExtractor.handleSafe (/community-server/dist/util/handlers/AsyncHandler.js:29:21)
    at async BasicRequestParser.handle (/community-server/dist/http/input/BasicRequestParser.js:22:24)
/community-server # exit

So that's a 500 error. Same happens for http://thirdparty:3000/.well-known/openid-configuration or when trying to access the openid-configuration of server from inside server. But notice also the response is different (405 error) if you address the server as 'localhost':

/community-server # curl  -IL http://localhost:3000/.well-known/openid-configuration 
HTTP/1.1 302 Found
Vary: Accept,Authorization,Origin
X-Powered-By: Community Solid Server
Updates-Via: ws://localhost:3000/
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Accept-Patch,Accept-Post,Accept-Put,Allow,ETag,Last-Modified,Link,Location,MS-Author-Via,Updates-Via,WAC-Allow
MS-Author-Via: SPARQL
Location: http://localhost:3000/setup
Date: Wed, 30 Aug 2023 08:03:46 GMT
Connection: keep-alive
Keep-Alive: timeout=5

HTTP/1.1 405 Method Not Allowed
Vary: Accept,Authorization,Origin
X-Powered-By: Community Solid Server
Updates-Via: ws://localhost:3000/
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Accept-Patch,Accept-Post,Accept-Put,Allow,ETag,Last-Modified,Link,Location,MS-Author-Via,Updates-Via,WAC-Allow
Allow: OPTIONS, GET, PATCH, POST, PUT, DELETE
Accept-Patch: text/n3, application/sparql-update
Accept-Post: */*
Accept-Put: */*
MS-Author-Via: SPARQL
Content-Type: application/json
Date: Wed, 30 Aug 2023 08:03:46 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Maybe these should be run on https instead of http?

@michielbdejong
Copy link
Member

Maybe the error is thrown from this line?

throw new InternalServerError(`The identifier ${identifier.path} is outside the configured identifier space.`,

@mrvahedi68
Copy link
Author

It is because the server started with localhost as base address and after that we want to get data with another base address and got the error.

some related test:

it('supports URLs in its domain.', async(): Promise<void> => {

@michielbdejong
Copy link
Member

@mrvahedi68 I've been thinking maybe this issue becomes easier if we do it without Docker?
In GitHub actions, the current repo is already checked out and it should be easy to run the server using npm start.
Then we can just git clone the solid-crud-tests and web-access-control-tests repos, run npm ci in them and then use the existing run-against-css.sh scripts from those two repos. That has the additional advantage that we're keeping those two scripts maintained. What do you think?

@mrvahedi68
Copy link
Author

After removing docker instructions and run tests by pulling the solid-crud-test source code, have this result:

Screen Shot 1402-06-11 at 17 35 54

Signed-off-by: MohammadReza vahedi <[email protected]>
Signed-off-by: MohammadReza vahedi <[email protected]>
@michielbdejong
Copy link
Member

Was it a conscious decision to use the nss-skips branch instead of the main branch for solid-crud-tests? Did you look into the difference between the two?

@michielbdejong
Copy link
Member

Can you create GitHub issues for the two failing tests?

@michielbdejong michielbdejong marked this pull request as ready for review September 2, 2023 19:43
@michielbdejong michielbdejong merged commit 97ae809 into pdsinterop:main Sep 2, 2023
2 of 22 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants