Skip to content

Convert GRPC Integration tests to run as UT #747

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

Merged
merged 7 commits into from
Jul 18, 2022

Conversation

avanaur
Copy link
Contributor

@avanaur avanaur commented Jul 5, 2022

Changes

Convert GRPC Integration tests to component tests runnable as unit tests.

The component tests uses an SQLite as in-memory DB.

The variable isIntegrationTests is removed but the tag integration_tests is kept for conductor RPC setup (although this seems not completely setup anymore).

Minor change on some GORM fields to use default:current_timestamp instead of default:now() to work with SQLite.

Fixes

Resolves #607

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

  • 0chain:
  • gosdk:
  • system_test:
  • zboxcli:
  • zwalletcli:
  • Other: ...

@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2022

Codecov Report

Merging #747 (b8561db) into staging (28ea8c0) will increase coverage by 5.99%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           staging     #747      +/-   ##
===========================================
+ Coverage    24.01%   30.01%   +5.99%     
===========================================
  Files           68       68              
  Lines         7653     7653              
===========================================
+ Hits          1838     2297     +459     
+ Misses        5548     5014     -534     
- Partials       267      342      +75     
Flag Coverage Δ
Unit-Tests 30.01% <ø> (+5.99%) ⬆️

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

Impacted Files Coverage Δ
...o/0chain.net/blobbercore/reference/collaborator.go 0.00% <ø> (ø)
.../0chain.net/blobbercore/reference/commitmetatxn.go 0.00% <ø> (ø)
code/go/0chain.net/blobbercore/reference/ref.go 0.00% <ø> (ø)
...e/go/0chain.net/blobbercore/reference/shareinfo.go 0.00% <ø> (ø)
code/go/0chain.net/blobbercore/handler/handler.go 64.14% <0.00%> (+7.07%) ⬆️
.../go/0chain.net/blobbercore/handler/grpc_helpers.go 78.04% <0.00%> (+7.31%) ⬆️
...et/blobbercore/handler/object_operation_handler.go 43.03% <0.00%> (+13.37%) ⬆️
...o/0chain.net/blobbercore/handler/handler_common.go 32.65% <0.00%> (+15.30%) ⬆️
.../0chain.net/blobbercore/handler/storage_handler.go 39.30% <0.00%> (+15.53%) ⬆️
...ain.net/blobbercore/handler/grpc_commit_handler.go 64.00% <0.00%> (+64.00%) ⬆️
... and 2 more

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 28ea8c0...b8561db. Read the comment docs.

@avanaur avanaur changed the title WIP Convert Integration tests Convert GRPC Integration tests to run as UT Jul 6, 2022
@avanaur avanaur marked this pull request as ready for review July 6, 2022 14:12
@avanaur avanaur requested review from cnlangzi and lpoli July 6, 2022 14:14
Copy link
Contributor

@peterlimg peterlimg left a comment

Choose a reason for hiding this comment

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

lgtm

@cnlangzi cnlangzi merged commit 2727afc into staging Jul 18, 2022
@cnlangzi cnlangzi deleted the feature/conv-integration-tests branch July 18, 2022 03:50
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.

🐛 Remove isIntegrationTest in main code
4 participants