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

Unit test for get blobbers from params #2891

Merged
merged 12 commits into from Oct 30, 2023

Conversation

tanishq67
Copy link
Contributor

@tanishq67 tanishq67 commented Oct 21, 2023

Fixes

This PR is not yet complete, I have created it as a draft
-> I have written the unit test for get blobbers from params
The am testing if everything goes alright with 1st blobbers then I will create all the other blobbers accordingly.

Changes

There are no changes apart from the blobbers_test file changes

Need to be mentioned in CHANGELOG.md?

I don't think so.

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):

  • blobber: (*)
  • gosdk:
  • system_test:
  • zboxcli:
  • zwalletcli:
  • Other: ...

@tanishq67 tanishq67 linked an issue Oct 21, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2023

Codecov Report

❗ No coverage uploaded for pull request base (sprint-1.11@5b5afde). Click here to learn what that means.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@              Coverage Diff               @@
##             sprint-1.11    #2891   +/-   ##
==============================================
  Coverage               ?   28.75%           
==============================================
  Files                  ?      395           
  Lines                  ?    66327           
  Branches               ?        0           
==============================================
  Hits                   ?    19073           
  Misses                 ?    44944           
  Partials               ?     2310           
Flag Coverage Δ
Unit-Tests 28.75% <0.00%> (?)

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

@tanishq67 tanishq67 changed the title Work in Progress: Unit test for get blobbers from params Unit test for get blobbers from params Oct 21, 2023
@tanishq67 tanishq67 changed the title Unit test for get blobbers from params WIP: Unit test for get blobbers from params Oct 21, 2023
@tanishq67
Copy link
Contributor Author

@Jayashsatolia403 Please take a look at the values.

@tanishq67
Copy link
Contributor Author

@Jayashsatolia403 @dabasov
When I am running the tests over my local system, the files "0chain.net/smartcontract/dbs/event" says "ok"

However, it's failing in here. What could be the reason? Please let me know how I can fix this.

image

Copy link
Collaborator

@Jayashsatolia403 Jayashsatolia403 left a comment

Choose a reason for hiding this comment

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

Delete only the added blobbers. Also, use a cleanup function so that if it fails in the middle, it won't affect other tests.

@tanishq67
Copy link
Contributor Author

Delete only the added blobbers. Also, use a cleanup function so that if it fails in the middle, it won't affect other tests.

Hey @Jayashsatolia403, I have updated the PR. Please have a look at this. Is this what you meant?

image

@tanishq67
Copy link
Contributor Author

tanishq67 commented Oct 26, 2023

@dabasov please take a look at the PR, I have added the cleanupBlobbers function because due to some unknown reason defer clean was not working properly as other unit tests were failing on GitHub

Copy link
Member

@dabasov dabasov left a comment

Choose a reason for hiding this comment

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

lgtm

@tanishq67
Copy link
Contributor Author

@dabasov do I have to do anything?

@tanishq67 tanishq67 changed the title WIP: Unit test for get blobbers from params Unit test for get blobbers from params Oct 27, 2023
@dabasov dabasov merged commit 0d555ca into sprint-1.11 Oct 30, 2023
5 checks passed
@dabasov dabasov deleted the Unit-test-GetBlobbersFromParams branch October 30, 2023 15:09
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.

Add unit tests for GetBlobbersFromParams
4 participants