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

Refactor/move tests #289

Merged
merged 13 commits into from
Jun 11, 2021
Merged

Refactor/move tests #289

merged 13 commits into from
Jun 11, 2021

Conversation

Patrik-Stas
Copy link
Contributor

@Patrik-Stas Patrik-Stas commented Jun 8, 2021

  • Number of integration tests were written on connection handle layer, whereas what these test were really testing was Connection object. So these tests were moved to VCX Connection object layer and adjusted to work with Connection, not with handles
  • That also reflected on changes in TestAgent which stored Connection rather than handle
  • Unit tests for serialization and deserialization were also moved to work directly with Connection
  • Connection::get_invite_details returns Invitation rather than &str
  • Moved logic from handle layer, so new function Connection::download_messages was created
  • Moved logic from handle layer, so new function Connection::to_string, Connection::from_string were created

@Patrik-Stas Patrik-Stas requested a review from a team as a code owner June 8, 2021 15:45
@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2021

Codecov Report

Merging #289 (e5c9f3b) into master (61d84d6) will increase coverage by 0.02%.
The diff coverage is 36.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #289      +/-   ##
==========================================
+ Coverage   49.79%   49.81%   +0.02%     
==========================================
  Files         153      153              
  Lines       19345    19430      +85     
  Branches     6061     6105      +44     
==========================================
+ Hits         9632     9679      +47     
+ Misses       5016     4999      -17     
- Partials     4697     4752      +55     
Flag Coverage Δ
integration 22.11% <23.98%> (-0.32%) ⬇️
unittests 45.63% <27.04%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
libvcx/src/aries/mod.rs 23.07% <ø> (ø)
libvcx/src/lib.rs 0.00% <ø> (ø)
libvcx/src/utils/devsetup.rs 62.66% <ø> (ø)
libvcx/src/utils/devsetup_agent.rs 20.32% <4.08%> (-0.84%) ⬇️
libvcx/src/aries/handlers/connection/connection.rs 43.75% <41.83%> (ø)
libvcx/src/connection.rs 54.32% <61.53%> (+5.04%) ⬆️
...aries/handlers/connection/invitee/state_machine.rs 62.80% <0.00%> (+0.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61d84d6...e5c9f3b. Read the comment docs.

libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
libvcx/src/aries/handlers/connection/connection.rs Outdated Show resolved Hide resolved
…ons testing function

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>
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>
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>
@Patrik-Stas Patrik-Stas requested a review from mirgee June 11, 2021 12:38
@mirgee mirgee merged commit 05630c4 into master Jun 11, 2021
@mirgee mirgee deleted the refactor/move-tests branch June 11, 2021 15:49
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.

None yet

3 participants