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

Integration test refactoring #983

Merged
merged 24 commits into from
Sep 19, 2023
Merged

Integration test refactoring #983

merged 24 commits into from
Sep 19, 2023

Conversation

mirgee
Copy link
Contributor

@mirgee mirgee commented Sep 18, 2023

  • Splits test helper functions doing multiple distinct operations and returning many-valued tuples into small, reusable functions returning objects
  • Moves ledger tests from aries_vcx/src/common/primitives/mod.rs and aries_vcx/src/common/primitives/revocation_registry_delta.rs to tests/test_pool.rs.
  • Localizes test helper functions like create_indy_proof which ended up used in one test suite.
  • Leaves only generic test helpers in aries_vcx/src/common/test_utils.rs.
  • Issuance and presentation test helpers are strictly accepting concrete message types instead of generic AriesMessage (without implementing message-specific methods on issuance and presentation handlers, which can be done separately).

Although further test refactoring is warranted, the aim of this PR is to focus on integration tests (only those in aries_vcx/tests/).

…lace of usage

Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
… test

Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
…essage

Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2023

Codecov Report

Merging #983 (8b8046a) into main (9b7ce90) will increase coverage by 0.39%.
The diff coverage is 89.33%.

❗ Current head 8b8046a differs from pull request most recent head fcda444. Consider uploading reports for the commit fcda444 to get more accurate results

@@            Coverage Diff             @@
##             main     #983      +/-   ##
==========================================
+ Coverage   28.89%   29.28%   +0.39%     
==========================================
  Files         419      417       -2     
  Lines       25981    26111     +130     
  Branches     5228     5223       -5     
==========================================
+ Hits         7506     7647     +141     
+ Misses      16271    16269       -2     
+ Partials     2204     2195       -9     
Flag Coverage Δ
unittests-aries-vcx 29.28% <89.33%> (+0.39%) ⬆️

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

Files Changed Coverage Δ
aries_vcx/src/common/mod.rs 54.01% <ø> (ø)
...s_vcx/src/common/primitives/revocation_registry.rs 46.50% <0.00%> (ø)
...src/common/primitives/revocation_registry_delta.rs 26.66% <0.00%> (-26.07%) ⬇️
aries_vcx/src/handlers/issuance/holder.rs 42.13% <ø> (ø)
...es_vcx/tests/utils/scenarios/proof_presentation.rs 77.60% <45.45%> (+1.83%) ⬆️
...ies_vcx/src/common/primitives/credential_schema.rs 10.89% <50.00%> (+10.89%) ⬆️
...es_vcx/src/handlers/proof_presentation/verifier.rs 39.37% <75.00%> (ø)
aries_vcx/tests/test_pool.rs 85.60% <87.09%> (+0.98%) ⬆️
aries_vcx/src/common/credentials/mod.rs 81.66% <87.50%> (+5.90%) ⬆️
...s_vcx/tests/utils/scenarios/credential_issuance.rs 83.41% <89.18%> (+2.94%) ⬆️
... and 10 more

... and 5 files with indirect coverage changes

…iesMessage

Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
…st_credential

Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
@mirgee mirgee marked this pull request as ready for review September 18, 2023 17:47
@Patrik-Stas Patrik-Stas merged commit 0907dcc into main Sep 19, 2023
30 checks passed
@Patrik-Stas Patrik-Stas deleted the refactor/integration-tests branch September 19, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants