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

Coverage for: factory/bootstrap #5139

Merged
merged 15 commits into from Apr 25, 2023
Merged

Conversation

sstanculeanu
Copy link
Contributor

Reasoning behind the pull request

  • increase code coverage

Proposed changes

  • increase coverage on factory/bootstrap

Testing procedure

  • standard system test

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Patch coverage: 88.48% and project coverage change: +6.87 🎉

Comparison is base (70b58fe) 70.90% compared to head (688d1c2) 77.78%.

❗ Current head 688d1c2 differs from pull request most recent head e428a96. Consider uploading reports for the commit e428a96 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##           rc/v1.6.0    #5139      +/-   ##
=============================================
+ Coverage      70.90%   77.78%   +6.87%     
=============================================
  Files            675      654      -21     
  Lines          87793    85979    -1814     
=============================================
+ Hits           62251    66880    +4629     
+ Misses         20864    13911    -6953     
- Partials        4678     5188     +510     
Impacted Files Coverage Δ
common/channels.go 100.00% <ø> (ø)
common/configParser.go 21.59% <0.00%> (-1.03%) ⬇️
factory/bootstrap/bootstrapComponentsHandler.go 78.94% <0.00%> (+78.94%) ⬆️
factory/processing/processComponents.go 66.02% <0.00%> (+66.02%) ⬆️
process/economics/builtInFunctionsCost.go 55.33% <0.00%> (-3.43%) ⬇️
.../rewardTransaction/interceptedRewardTransaction.go 94.02% <ø> (+4.02%) ⬆️
process/smartContract/vmInput.go 86.95% <ø> (+0.43%) ⬆️
process/track/miniBlockTrack.go 100.00% <ø> (ø)
process/transaction/baseProcess.go 80.00% <ø> (+2.64%) ⬆️
process/transaction/interceptedTransaction.go 90.51% <ø> (-3.67%) ⬇️
... and 57 more

... and 159 files with indirect coverage changes

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

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sstanculeanu sstanculeanu marked this pull request as ready for review March 31, 2023 14:58
@iulianpascalau iulianpascalau self-requested a review March 31, 2023 15:23
factory/bootstrap/bootstrapComponentsHandler_test.go Outdated Show resolved Hide resolved
@@ -82,9 +82,6 @@ func NewBootstrapComponentsFactory(args BootstrapComponentsFactoryArgs) (*bootst
if args.WorkingDir == "" {
return nil, errors.ErrInvalidWorkingDir
}
if check.IfNil(args.StatusCoreComponents) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

factory/bootstrap/bootstrapComponents_test.go Outdated Show resolved Hide resolved
@@ -29,6 +30,15 @@ func CreateShardCoordinator(
prefsConfig config.PreferencesConfig,
log logger.Logger,
) (sharding.Coordinator, core.NodeType, error) {
if check.IfNil(nodesConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

if check.IfNil(nodesConfig) {
return nil, "", errErd.ErrNilGenesisNodesSetupHandler
}
if pubKey == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

please use check.IfNil

iulianpascalau
iulianpascalau previously approved these changes Apr 3, 2023
@sstanculeanu sstanculeanu changed the title Unittests factory bootstrap [DO NOT MERGE YET] Unittests factory bootstrap Apr 3, 2023
…into unittests_factory_bootstrap

# Conflicts:
#	storage/factory/openStorage.go
#	storage/factory/openStorage_test.go
#	storage/latestData/latestDataProvider_test.go
@sstanculeanu sstanculeanu changed the title [DO NOT MERGE YET] Unittests factory bootstrap [DO NOT MERGE YET] Code coverage for: factory/bootstrap Apr 6, 2023
@sstanculeanu sstanculeanu changed the title [DO NOT MERGE YET] Code coverage for: factory/bootstrap [DO NOT MERGE YET] Coverage for: factory/bootstrap Apr 6, 2023
errors/errors.go Outdated
var ErrNilLogger = errors.New("nil logger")

// ErrNilShuffleOutCloser signals that a nil shuffler out closer has been provided
var ErrNilShuffleOutCloser = errors.New("nil shuffler out closer")
Copy link
Contributor

Choose a reason for hiding this comment

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

should we go with shuffler out or with shuffle out ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, typo

Comment on lines 489 to 490
t.Run("NewIndexHashedNodesCoordinator fails should error", func(t *testing.T) {
t.Parallel()
Copy link
Contributor

Choose a reason for hiding this comment

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

this test name and the previous one have the same name, rename here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

gabi-vuls
gabi-vuls previously approved these changes Apr 18, 2023
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed
@@ Log scanner @@

unittests_factory_bootstrap

================================================================================

  • Known Warnings 11
  • New Warnings 2
  • Known Errors 0
  • New Errors 0
  • Panics 0
    ================================================================================
  • block hash does not match 2754
  • wrong nonce in block 912
  • miniblocks does not match 0
  • num miniblocks does not match 0
  • miniblock hash does not match 0
  • block bodies does not match 0
  • receipts hash missmatch 0
    ================================================================================
  • No jailed nodes on the testnet
    ================================================================================

ssd04
ssd04 previously approved these changes Apr 24, 2023
@sstanculeanu sstanculeanu changed the base branch from rc/v1.5.0 to rc/v1.6.0 April 24, 2023 13:10
@sstanculeanu sstanculeanu dismissed stale reviews from ssd04 and gabi-vuls April 24, 2023 13:10

The base branch was changed.

@sstanculeanu sstanculeanu changed the base branch from rc/v1.6.0 to rc/v1.5.0 April 24, 2023 13:14
sstanculeanu and others added 2 commits April 24, 2023 16:15
…into unittests_factory_bootstrap

# Conflicts:
#	errors/errors.go
#	storage/errors.go
@sstanculeanu sstanculeanu changed the base branch from rc/v1.5.0 to rc/v1.6.0 April 24, 2023 15:21
@sstanculeanu sstanculeanu changed the title [DO NOT MERGE YET] Coverage for: factory/bootstrap Coverage for: factory/bootstrap Apr 24, 2023
@sstanculeanu sstanculeanu merged commit 5414646 into rc/v1.6.0 Apr 25, 2023
5 checks passed
@sstanculeanu sstanculeanu deleted the unittests_factory_bootstrap branch April 25, 2023 08:06
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

4 participants