Skip to content

test: comprehensive unit + e2e coverage across SDK (stacked on #132) #41

test: comprehensive unit + e2e coverage across SDK (stacked on #132)

test: comprehensive unit + e2e coverage across SDK (stacked on #132) #41

Triggered via pull request June 29, 2026 00:46
Status Failure
Total duration 4m 3s
Artifacts

ci.yaml

on: pull_request
lint-and-build
52s
lint-and-build
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

8 errors
test (22)
Process completed with exit code 1.
[e2e] src/tests/e2e/rebac.e2e.spec.ts > Permission check e2e test: src/tests/helpers/wait-for.ts#L21
Error: waitFor timed out after 60000ms: rebac step did not converge ❯ waitFor src/tests/helpers/wait-for.ts:21:13 ❯ src/tests/e2e/rebac.e2e.spec.ts:577:7
[e2e] src/tests/e2e/rbac.e2e.spec.ts > Permission check e2e test: src/enforcement/enforcer.ts#L456
PermitConnectionError: Permit SDK got error: and cannot connect to the PDP, please check your configuration and make sure the PDP is running at http://localhost:7766 and accepting requests. Read more about setting up the PDP at https://docs.permit.io ❯ src/enforcement/enforcer.ts:456:15 ❯ Enforcer.checkWithExceptions src/enforcement/enforcer.ts:422:12 ❯ Enforcer.check src/enforcement/enforcer.ts:392:12 ❯ Permit.check src/index.ts:194:12 ❯ src/tests/e2e/rbac.e2e.spec.ts:204:7
[e2e] src/tests/e2e/condition-sets.e2e.spec.ts > ABAC condition-set permission check e2e test: src/api/base.ts#L214
Error: Your resource haven't changed, you have tried to access 'clearance' attribute of built-in 'user' resource, but the resource does not have this attribute. Try creating 'clearance' attribute for built-in 'user' resource first and try again after. If you verified and the attribute does exist, contact our support on Slack for further guidance. ❯ ConditionSetsApi.handleApiError src/api/base.ts:214:13 ❯ ConditionSetsApi.create src/api/condition-sets.ts:205:12 ❯ src/tests/e2e/condition-sets.e2e.spec.ts:69:19 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { originalError: { message: 'Request failed with status code 400', name: 'AxiosError', description: undefined, number: undefined, fileName: undefined, lineNumber: undefined, columnNumber: undefined, stack: 'AxiosError: Request failed with status code 400\n at settle (file:///home/runner/work/permit-node/permit-node/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/permit-node/permit-node/node_modules/axios/lib/adapters/http.js:599:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at processTicksAndRejections (node:internal/process/task_queues:89:21)\n at Axios.request (file:///home/runner/work/permit-node/permit-node/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (node:internal/process/task_queues:103:5)\n at ConditionSetsApi.create (/home/runner/work/permit-node/permit-node/src/api/condition-sets.ts:199:9)\n at /home/runner/work/permit-node/permit-node/src/tests/e2e/condition-sets.e2e.spec.ts:69:19\n at file:///home/runner/work/permit-node/permit-node/node_modules/@vitest/runner/dist/chunk-artifact.js:1903:20', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http', 'fetch' ], transformRequest: [ 'Function<transformRequest>' ], transformResponse: [ 'Function<transformResponse>' ], timeout: +0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: 'Function<FormData>', Blob: 'Function<Blob>' }, validateStatus: 'Function<validateStatus>', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', Authorization: '***', 'X-Permit-SDK-Version': 'node:2.7.5', 'User-Agent': 'axios/1.10.0', 'Content-Length': '147', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'post', data: '{"key":"cs_e2e_userset_tize28","name":"cs_e2e_userset_tize28","type":"userset","conditions":{"allOf":[{"user.clearance":{"equals":"top_secret"}}]}}', url: 'https://api.permit.io/v2/schema/7f55831d77c642739bc17733ab0af138/94384ed4f1ad4b228d726b2741a5cecd/condition_sets', allowAbsoluteUrls: true }, code: 'ERR_BAD_REQUEST', status: 400 }, formattedAxiosError: { code: 'ERR_BAD_REQUEST', message: 'Your resource haven\'t changed, you have tried to access \'clearance\' attribute of built-in \'user\' resource, but the resource does not have this attribute. Try creating \'clearance\' attribute for built-in \'user\' resource first and try again after.\nIf you verified and the attribute does exist, contact our support on Slack for further guidance.', error: { id: '3fb3be7be3074466a9465f5c758fc874', title: 'The request was invalid', error_code: 'MISSING_RESOURCE_ATTRIBUTE', message: 'Your resource haven\'t changed, you have tried to access \'clearance\' attribute of built-in \'user\' resource, but the resource does not have this attribute. Try creating \'clearance\' attribute for built-in \'user\' resource first and try again after.\nIf you verified and the attribute does exist, contact our support on Slack for further guidance.' }, status: 400 }, request: { _events: { abort: 'Function<anonymous>', aborted: 'Function<anonymous>', connect: 'Function<anonymous>', error: 'Function<anonymous>', socket: 'Function<anonymous>', timeout: 'Function<anonymous>', finish: 'Function<requestOnFinish>'
test (20)
Process completed with exit code 1.
[e2e] src/tests/e2e/rebac.e2e.spec.ts > Permission check e2e test: src/tests/helpers/wait-for.ts#L21
Error: waitFor timed out after 60000ms: rebac step did not converge ❯ waitFor src/tests/helpers/wait-for.ts:21:13 ❯ src/tests/e2e/rebac.e2e.spec.ts:577:7
[e2e] src/tests/e2e/rbac.e2e.spec.ts > Permission check e2e test: src/enforcement/enforcer.ts#L456
PermitConnectionError: Permit SDK got error: and cannot connect to the PDP, please check your configuration and make sure the PDP is running at http://localhost:7766 and accepting requests. Read more about setting up the PDP at https://docs.permit.io ❯ src/enforcement/enforcer.ts:456:15 ❯ Enforcer.checkWithExceptions src/enforcement/enforcer.ts:422:12 ❯ Enforcer.check src/enforcement/enforcer.ts:392:12 ❯ Permit.check src/index.ts:194:12 ❯ src/tests/e2e/rbac.e2e.spec.ts:204:7
[e2e] src/tests/e2e/condition-sets.e2e.spec.ts > ABAC condition-set permission check e2e test: src/api/base.ts#L214
Error: Your resource haven't changed, you have tried to access 'clearance' attribute of built-in 'user' resource, but the resource does not have this attribute. Try creating 'clearance' attribute for built-in 'user' resource first and try again after. If you verified and the attribute does exist, contact our support on Slack for further guidance. ❯ ConditionSetsApi.handleApiError src/api/base.ts:214:13 ❯ ConditionSetsApi.create src/api/condition-sets.ts:205:12 ❯ src/tests/e2e/condition-sets.e2e.spec.ts:69:19 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { originalError: { message: 'Request failed with status code 400', name: 'AxiosError', description: undefined, number: undefined, fileName: undefined, lineNumber: undefined, columnNumber: undefined, stack: 'AxiosError: Request failed with status code 400\n at settle (file:///home/runner/work/permit-node/permit-node/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/permit-node/permit-node/node_modules/axios/lib/adapters/http.js:599:11)\n at IncomingMessage.emit (node:events:536:35)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (file:///home/runner/work/permit-node/permit-node/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at ConditionSetsApi.create (/home/runner/work/permit-node/permit-node/src/api/condition-sets.ts:199:9)\n at /home/runner/work/permit-node/permit-node/src/tests/e2e/condition-sets.e2e.spec.ts:69:19\n at file:///home/runner/work/permit-node/permit-node/node_modules/@vitest/runner/dist/chunk-artifact.js:1903:20', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http', 'fetch' ], transformRequest: [ 'Function<transformRequest>' ], transformResponse: [ 'Function<transformResponse>' ], timeout: +0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: 'Function<FormData>', Blob: 'Function<Blob>' }, validateStatus: 'Function<validateStatus>', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', Authorization: '***', 'X-Permit-SDK-Version': 'node:2.7.5', 'User-Agent': 'axios/1.10.0', 'Content-Length': '147', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'post', data: '{"key":"cs_e2e_userset_ebkpwe","name":"cs_e2e_userset_ebkpwe","type":"userset","conditions":{"allOf":[{"user.clearance":{"equals":"top_secret"}}]}}', url: 'https://api.permit.io/v2/schema/7f55831d77c642739bc17733ab0af138/cd4e4a7a18dc4a23b8b673069f7e6181/condition_sets', allowAbsoluteUrls: true }, code: 'ERR_BAD_REQUEST', status: 400 }, formattedAxiosError: { code: 'ERR_BAD_REQUEST', message: 'Your resource haven\'t changed, you have tried to access \'clearance\' attribute of built-in \'user\' resource, but the resource does not have this attribute. Try creating \'clearance\' attribute for built-in \'user\' resource first and try again after.\nIf you verified and the attribute does exist, contact our support on Slack for further guidance.', error: { id: '019e899137bc45d5a54e29dc8227670a', title: 'The request was invalid', error_code: 'MISSING_RESOURCE_ATTRIBUTE', message: 'Your resource haven\'t changed, you have tried to access \'clearance\' attribute of built-in \'user\' resource, but the resource does not have this attribute. Try creating \'clearance\' attribute for built-in \'user\' resource first and try again after.\nIf you verified and the attribute does exist, contact our support on Slack for further guidance.' }, status: 400 }, request: { _events: { abort: 'Function<anonymous>', aborted: 'Function<anonymous>', connect: 'Function<anonymous>', error: 'Function<anonymous>', socket: 'Function<anonymous>', timeout: 'Function<anonymous>', finish: 'Function<requestOnFinish>'