Skip to content

Expand test coverage for veres-one-validator when replacing MOCKPROOF #44

@aljones15

Description

@aljones15

We have tests for when the invocationTarget doesn't match, but we need tests for when you have the wrong root capability.

We need tests that hit this check in zcapld: https://github.com/digitalbazaar/zcapld/blob/e655ba0e67cbbf8d72467e7d650365bbe936a1c3/lib/utils.js#L522-L525

Also, we have no tests for the first proof in a record write operation because it is currently a MOCKPROOF.
When we remove the MOCKPROOF for a real ledgerWrite proof we need to also add a set of tests that ensure that ledgerWrites fail if

  • The invocationTarget has the wrong <incorrect-ledgerId>/records
  • The invocationTarget has a unknown path <ledgerId>/unknown
  • The capability id for the ledgerWrite proof is invalid capability: urn:zcap:invalid:foo
  • The capability id for the ledgerWrite proof refers to a non-existent ledger (this might succeed) urn:zcap:root:did:non:existent:ledger

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