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

Improve mappings from vdrtools, refactor tests in libvcx #721

Merged
merged 5 commits into from
Jan 9, 2023

Conversation

Patrik-Stas
Copy link
Contributor

@Patrik-Stas Patrik-Stas commented Jan 6, 2023

Changes

  • Adjust IndyErrorKind -> AriesVcxErrorKind to more sensible mapping
  • Add new LedgerItemNotFound err kind to ariesvcx, libvcx
  • Add new ObjectAccessError err kind to libvcx
  • Fix wrong err handling - it wrong key is used to open wallet, throw LibvcxErrorKind::WalletAccessFailed err kind instead of "unmapped" libindy error LibvcxErrorKind::LibndyError(207). Added test to libvcx to cover this case

Refactoring

  • Move tests from api_c layer to api_vcx
  • Delete dead code

Signed-off-by: Patrik Stas patrik.stas@absa.africa

@Patrik-Stas Patrik-Stas requested a review from a team as a code owner January 6, 2023 18:16
@Patrik-Stas Patrik-Stas changed the title Improve IndyError->AriesVcxError mapping, refactor tests in libvcx Improve mappings from vdrtools, refactor tests in libvcx Jan 6, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2023

Codecov Report

Merging #721 (a7d7031) into main (0c8eb58) will increase coverage by 0.09%.
The diff coverage is 18.75%.

@@            Coverage Diff             @@
##             main     #721      +/-   ##
==========================================
+ Coverage   64.30%   64.39%   +0.09%     
==========================================
  Files         245      244       -1     
  Lines       22911    22828      -83     
  Branches     5072     5070       -2     
==========================================
- Hits        14732    14701      -31     
+ Misses       4035     4003      -32     
+ Partials     4144     4124      -20     
Flag Coverage Δ
unittests-aries-vcx 64.25% <18.75%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...vcx/src/common/primitives/credential_definition.rs 50.50% <0.00%> (ø)
aries_vcx/src/common/proofs/verifier/verifier.rs 83.94% <ø> (ø)
aries_vcx/src/errors/error.rs 43.24% <ø> (ø)
aries_vcx/src/indy/anoncreds.rs 71.73% <ø> (+4.39%) ⬆️
aries_vcx/src/indy/ledger/transactions.rs 53.86% <ø> (+1.90%) ⬆️
...ies_vcx/src/indy/primitives/revocation_registry.rs 58.26% <ø> (-0.87%) ⬇️
aries_vcx/src/indy/utils/mod.rs 60.60% <ø> (ø)
aries_vcx/src/plugins/ledger/indy_vdr_ledger.rs 44.37% <ø> (+0.92%) ⬆️
aries_vcx/src/utils/devsetup.rs 73.74% <0.00%> (ø)
...ries_vcx/src/utils/mockdata/profile/mock_ledger.rs 25.96% <0.00%> (ø)
... and 38 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

gmulhearn
gmulhearn previously approved these changes Jan 9, 2023
Copy link
Contributor

@gmulhearn gmulhearn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just the one comment

aries_vcx/src/indy/wallet.rs Outdated Show resolved Hide resolved
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
@mirgee mirgee merged commit e82b6e5 into main Jan 9, 2023
@mirgee mirgee deleted the refactor/libvcx-tests branch January 9, 2023 14:33
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