Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest crypto-ld and jsigs api. #83

Merged
merged 32 commits into from
Apr 21, 2021
Merged

Update to latest crypto-ld and jsigs api. #83

merged 32 commits into from
Apr 21, 2021

Conversation

@aljones15
Copy link
Contributor

aljones15 commented Dec 10, 2020

it looks like this has lint issues causing the test suite to fail.

EDIT: actually it looks like tests are failing in this branch.

my local test-node result:

  verify API (presentations)
    1) verifies a valid signed presentation
    2) verifies an unsigned presentation

  tests for multiple credentials
    3) cause error when credentials are tampered
    4) should not cause error when credentials are correct
    5) cause error when credentials are tampered
    6) should not cause error when credentials are correct
    7) cause error when credentials are tampered
    8) should not cause error when credentials are correct
    9) cause error when credentials are tampered
    10) should not cause error when credentials are correct


  18 passing (2s)
  10 failing

  1) verify API (presentations)
       verifies a valid signed presentation:
     VerificationError: Verification error(s).
      at Object.verify (node_modules/jsonld-signatures/lib/jsonld-signatures.js:124:22)                              
      at _verifyPresentation (lib/vc.js:436:30)                                                                      
      at Context.<anonymous> (tests/10-verify.spec.js:319:20)                                                        
                                                                                                                     
  2) verify API (presentations)
       verifies an unsigned presentation:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:350:31)                                                        
                                                                                                                     
  3) tests for multiple credentials
       cause error when credentials are tampered:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:396:39)                                                        
                                                                                                                     
  4) tests for multiple credentials
       should not cause error when credentials are correct:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:419:33)                                                        
                                                                                                                     
  5) tests for multiple credentials
       cause error when credentials are tampered:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:396:39)                                                        
      at processTicksAndRejections (internal/process/task_queues.js:93:5)                                            
                                                                                                                     
  6) tests for multiple credentials
       should not cause error when credentials are correct:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:419:33)                                                        
      at processTicksAndRejections (internal/process/task_queues.js:93:5)                                            
                                                                                                                     
  7) tests for multiple credentials
       cause error when credentials are tampered:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:396:39)                                                        
      at processTicksAndRejections (internal/process/task_queues.js:93:5)                                            
                                                                                                                     
  8) tests for multiple credentials
       should not cause error when credentials are correct:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:419:33)                                                        
      at processTicksAndRejections (internal/process/task_queues.js:93:5)                                            
                                                                                                                     
  9) tests for multiple credentials
       cause error when credentials are tampered:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:396:39)                                                        
      at processTicksAndRejections (internal/process/task_queues.js:93:5)                                            
                                                                                                                     
  10) tests for multiple credentials
       should not cause error when credentials are correct:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/10-verify.spec.js:419:33)                                                        
      at processTicksAndRejections (internal/process/task_queues.js:93:5)   

and with the test suites in

npm test

> [email protected] test /home/liminal18/Programs/nodeJS/digital_bazaar/vc-js
> bin/vc-test

evidence (cardinality) ... FAIL
evidence (objects) ... FAIL
evidence (url invalid) ... ok
evidence ... FAIL
issued (cardinality invalid) ... ok
issued (invalid) ... ok
issued (date invalid) ... ok
issued ... FAIL
issuer (cardinality invalid) ... ok
issuer (uri invalid) ... ok
issuer (object id) ... FAIL
issuer ... FAIL
minimal ... FAIL
revocation (type invalid) ... ok
revocation (url invalid) ... ok
revocation ... FAIL

======================================================================
FAIL: evidence (cardinality)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: evidence (objects)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: evidence
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: issued
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: issuer (object id)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: issuer
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: minimal
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

======================================================================
FAIL: revocation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
    self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n                  ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n    at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n    at Module._compile (internal/modules/cjs/loader.js:1063:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n    at Module.load (internal/modules/cjs/loader.js:928:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n    at internal/main/run_main_module.js:17:47\n'}

----------------------------------------------------------------------
Ran 16 tests in 7.091s

FAILED (failures=8)

@davidlehn davidlehn merged commit 36e22a5 into master Apr 21, 2021
@dlongley dlongley deleted the v7.x branch January 8, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants