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(SPV-1058): provide method for setting up engine without server. #752

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

dorzepowski
Copy link
Contributor

@dorzepowski dorzepowski commented Oct 28, 2024

Context

We will need the way to set up the database to make unit/integration tests of collecting inputs.
The inputs will be collected with some smart SQL query, and we need to have some way to test this.

Why this change then?

I feel like the best way for configuring the environment for such a tests, which will give us pretty good confidence level is to spin up whole spv-wallet engine with SQLite connection.

What is this change about?

As we already had solution (testabilities for endpoint tests) to setup engine and server for endpoint tests, I'm extracting engine setup to separate package in engine subpackage so that it can be used in engine for any tests that should be at that level of complexity of environment setup.

Pull Request Checklist

  • 📖 I created my PR using provided : CODE_STANDARDS
  • 📖 I have read the short Code of Conduct: CODE_OF_CONDUCT
  • 🏠 I tested my changes locally.
  • ✅ I have provided tests for my changes.
  • 📝 I have used conventional commits.
  • 📗 I have updated any related documentation.
  • 💾 PR was issued based on the Github or Jira issue.

Sorry, something went wrong.

@dorzepowski dorzepowski requested a review from a team as a code owner October 28, 2024 08:13
Copy link

github-actions bot commented Oct 28, 2024

Manual Tests

💚 Manual testing by @mgosek-4chain resulted in success.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 83.24324% with 31 lines in your changes missing coverage. Please review.

Project coverage is 44.99%. Comparing base (45681a8) to head (93b48b2).

Files with missing lines Patch % Lines
...gine/testabilities/fixture_block_header_service.go 70.66% 18 Missing and 4 partials ⚠️
engine/testabilities/fixture_engine.go 95.91% 3 Missing and 1 partial ⚠️
config/config_to_options.go 0.00% 3 Missing ⚠️
...ons/testabilities/fixture_spvwallet_application.go 77.77% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #752      +/-   ##
==========================================
+ Coverage   44.59%   44.99%   +0.40%     
==========================================
  Files         329      330       +1     
  Lines       17058    17088      +30     
==========================================
+ Hits         7607     7689      +82     
+ Misses       8867     8814      -53     
- Partials      584      585       +1     
Flag Coverage Δ
unittests 44.99% <83.24%> (+0.40%) ⬆️

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

Files with missing lines Coverage Δ
...ons/testabilities/fixture_spvwallet_application.go 74.41% <77.77%> (-1.32%) ⬇️
config/config_to_options.go 0.00% <0.00%> (ø)
engine/testabilities/fixture_engine.go 95.91% <95.91%> (ø)
...gine/testabilities/fixture_block_header_service.go 70.66% <70.66%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@dorzepowski dorzepowski marked this pull request as draft October 28, 2024 08:24
@dorzepowski dorzepowski force-pushed the refactor/engine-fixture branch from 332b4b2 to 51c3787 Compare October 28, 2024 08:26
@dorzepowski dorzepowski marked this pull request as ready for review October 28, 2024 08:38
@mgosek-4chain mgosek-4chain added the tested PR was tested by a team member label Oct 30, 2024
@dorzepowski dorzepowski merged commit b2d1207 into main Oct 30, 2024
11 checks passed
@dorzepowski dorzepowski deleted the refactor/engine-fixture branch October 30, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR was tested by a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants