Repository navigation
Tests fail with new solid-permissions #619
Copy link
Copy link
Closed
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
timbl commentedon Dec 4, 2017
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)
melvincarvalho commentedon Dec 14, 2017
These tests are fixed now.
We can however change the text for some of these tests.
dmitrizagidulin commentedon May 7, 2018
Is this issue still valid, or can we close?
RubenVerborgh commentedon May 8, 2018
@timbl This is the assertion library we use. I agree it's badly phrased indeed.