w3c / vc-di-ecdsa-test-suite

Interoperability Test Suite for Data Integrity Ecdsa Signatures.
https://w3c.github.io/vc-di-ecdsa-test-suite/
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

running local tests #25

Closed HelgeKrueger closed 10 months ago

HelgeKrueger commented 10 months ago

when I run the verification test with tag = "localhost", I run into the following error

> vc-di-ecdsa-test-suite@2.0.0 test
> mocha tests/20-rdfc-verify.js --reporter @digitalbazaar/mocha-w3c-interop-reporter --reporter-options abstract="$PWD/abstract.hbs",reportDir="$PWD/reports",respec="$PWD/respecConfig.json",suiteLog='./suite.log',templateData="$PWD/reports/index.json",title="Data Integrity ecdsa 2019 Interoperability Report 1.0" --timeout 15000 --preserve-symlinks

  ecdsa-rdfc-2019 (verify)
    Data Integrity (ecdsa-rdfc-2019 verifiers)
      Helge: P-256, P-384
        ✓ If the "proof" field is missing, an error MUST be raised.
        ✓ If the "proof" field is invalid, an error MUST be raised.
        ✓ If the "proof.type" field is missing, an error MUST be raised.
        ✓ If the "proof.type" field is not the string "DataIntegrityProof", an error MUST be raised.
        ✓ If the "proof.verificationMethod" field is missing, an error MUST be raised.
        ✓ If the "proof.verificationMethod" field is invalid, an error MUST be raised.
        ✓ If the "proof.proofPurpose" field is missing, an error MUST be raised.
        ✓ If the "proof.proofPurpose" field is invalid, an error MUST be raised.
        ✓ If the "proof.proofPurpose" value does not match "options.expectedProofPurpose", an error MUST be raised.
        ✓ If the "proof.proofValue" field is missing, an error MUST be raised.
        ✓ If the "proof.proofValue" field is invalid, an error MUST be raised.
        ✓ If the "proof.created" field is invalid, an error MUST be raised.
        ✓ If the "proof.proofValue" field is not a multibase-encoded base58-btc value, an error MUST be raised.
        ✓ If the "options.domain" is set and it does not match "proof.domain", an error MUST be raised.
        ✓ If the "options.challenge" is set and it does not match "proof.challenge", an error MUST be raised.
    ecdsa-rdfc-2019 (verifiers)
      ❌ "before all" hook in "ecdsa-rdfc-2019 (verifiers)"
      TypeError: Cannot read properties of undefined (reading 'endpoints')
    at Context.<anonymous> (file:///.....vc-di-ecdsa-test-suite/tests/20-rdfc-verify.js:31:44)
    at process.processImmediate (node:internal/timers:478:21)

The relevant code line is:

      // Use DB issuer to issue a verifiable credential for the verifier tests
      issuers = match.get("Digital Bazaar").endpoints;

judging from the name and what happens when I revert the change to tag, this seems to be an issue with the implementation.

JSAssassin commented 10 months ago

@HelgeKrueger Sorry, the fix for that is in a PR right now. See - https://github.com/w3c/vc-di-ecdsa-test-suite/pull/24. You can specify the issuer (and if you need you can also specify the vc holder) used in the test suite to generate test data via env variables(ISSUER_NAME and HOLDER_NAME) when running the tests.