Skip to content

Tests fail with new solid-permissions #619

Closed

Description

@melvincarvalho

The latest upgrade to solid-permissions causes 4 tests to fail.

  1) ACL HTTP Origin user1 should be denied access to test directory when origin is invalid:
     Uncaught AssertionError: expected 200 to equal 403
      at Request._callback (test/integration/acl-oidc-test.js:304:18)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
      at endReadableNT (_stream_readable.js:926:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  2) ACL HTTP Origin agent should be denied access to test directory when origin is invalid:
     Uncaught AssertionError: expected 200 to equal 401
      at Request._callback (test/integration/acl-oidc-test.js:336:18)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
      at endReadableNT (_stream_readable.js:926:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  3) ACL with WebID+TLS Origin user1 should be denied access to test directory when origin is invalid:
     Uncaught AssertionError: expected 200 to equal 403
      at Request._callback (test/integration/acl-tls-test.js:325:18)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
      at endReadableNT (_stream_readable.js:926:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  4) ACL with WebID+TLS Origin agent should be denied access to test directory when origin is invalid:
     Uncaught AssertionError: expected 200 to equal 401
      at Request._callback (test/integration/acl-tls-test.js:357:18)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
      at endReadableNT (_stream_readable.js:926:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

The reason is that the acl allows public access but the test expects a 4xx if the origin is wrong.

Solution is to send HTTP response code 200 and tweak the test title.

Activity

  1. timbl commented on Dec 4, 2017

    @timbl
    Contributor

    I note the test result "AssertionError: expected 200 to equal 403" is REALY badly phrased ... 200 never equals 403 ... does it mean "Expected 200, got 403, or expected 403, got 200?" (I suspect 200 is in fact NOT the expected value, 403 is)

  2. melvincarvalho commented on Dec 14, 2017

    @melvincarvalho
    ContributorAuthor

    These tests are fixed now.

    We can however change the text for some of these tests.

  3. dmitrizagidulin commented on May 7, 2018

    @dmitrizagidulin
    Contributor

    Is this issue still valid, or can we close?

  4. RubenVerborgh commented on May 8, 2018

    @RubenVerborgh
    Contributor

    @timbl This is the assertion library we use. I agree it's badly phrased indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions