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

WAC tests failing #23

Open
mrvahedi68 opened this issue Sep 3, 2023 · 1 comment
Open

WAC tests failing #23

mrvahedi68 opened this issue Sep 3, 2023 · 1 comment

Comments

@mrvahedi68
Copy link

One test of WAC is failing:

     FAIL  test/surface/fetch-pod-root-acl.test.ts (14.079 s)
  Alice's storage root
    ✕ has an ACL (5 ms)

  ● Alice's storage root › has an ACL

    expect(received).toEqual(expected) // deep equality

    Expected: 1
    Received: 0

      15 | 
      16 |   test("has an ACL", async () => {
    > 17 |     expect(podRoots.length).toEqual(1);
         |                             ^
      18 |     const aclDocUrl = await solidLogicAlice.findAclDocUrl(podRoots[0]);
      19 |     await solidLogicAlice.load(aclDocUrl);
      20 |     expect(solidLogicAlice.store.statementsMatching(undefined, undefined, undefined, sym(aclDocUrl)).length).toBeGreaterThan(0);

      at test/surface/fetch-pod-root-acl.test.ts:17:29
      at step (test/surface/fetch-pod-root-acl.test.ts:33:23)
      at Object.next (test/surface/fetch-pod-root-acl.test.ts:14:53)
      at test/surface/fetch-pod-root-acl.test.ts:8:71
      at Object.<anonymous>.__awaiter (test/surface/fetch-pod-root-acl.test.ts:4:12)
      at Object.<anonymous> (test/surface/fetch-pod-root-acl.test.ts:16:22)
@mrvahedi68
Copy link
Author

In the run-against-css.sh we have a command to upload .acl file to CSS:

    echo Setting root acl in system under test:
    echo "@prefix acl: <http://www.w3.org/ns/auth/acl#>. <#alice> a acl:Authorization ; acl:agent <$WEBID_ALICE> ;acl:accessTo </>; acl:default </>; acl:mode acl:Read, acl:Write, acl:Control ." > root-acl.ttl
    curl -v -X PUT -H 'Content-Type: text/turtle' -T root-acl.ttl http://localhost:3000/.acl

the curl result returns 401 status code:

    {"name":"UnauthorizedHttpError","message":"","statusCode":401,"errorCode":"H401","stack":"UnauthorizedHttpError\n    at PermissionBasedAuthorizer.requireModePermission (/workspace/community-server/dist/authorization/PermissionBasedAuthorizer.js:73:23)\n    at PermissionBasedAuthorizer.handle (/workspace/community-server/dist/authorization/PermissionBasedAuthorizer.js:38:22)\n    at PermissionBasedAuthorizer.handleSafe (/workspace/community-server/dist/util/handlers/AsyncHandler.js:29:21)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async AuthorizingHttpHandler.handle (/workspace/community-server/dist/server/AuthorizingHttpHandler.js:36:13)\n    at async ParsingHttpHandler.handle (/workspace/community-server/dist/server/ParsingHttpHandler.js:29:22)\n    at async RouterHandler.handle (/workspace/community-server/dist/server/util/RouterHandler.js:43:9)\n    at async SequenceHandler.handle (/workspace/community-server/dist/util/handlers/SequenceHandler.js:27:26)\n    * Connection #0 to host localhost left intact
at async Server.<anonymous> (/workspace/community-server/dist/server/BaseHttpServerFactory.js:33:17)"}

The filing test checks for existing of .acl file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant