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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit testing script failing to run 0chain.net/smartcontract/dbs/event tests #2375

Merged
merged 1 commit into from May 5, 2023

Conversation

devyetii
Copy link
Collaborator

@devyetii devyetii commented May 5, 2023

Fixes

Unit testing script is not working as 0chain.net/smartcontract/dbs/event need docker within the test environment

Changes

  • Install docker within the test environment
  • Use host's docker daemon as it's not possible to get docker service running inside the container running zchain_unit_test image. It's built on docker's official Alpine image and this is a known issue here. This is done by mounting docker's socket from the host to the container.
  • Add --network=host to the container to be able to the database created during the test setup using localhost as database host.

Need to be mentioned in CHANGELOG.md?

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

@devyetii devyetii changed the title install docker and use host's docker daemon Fix unit testing script failing to run 0chain.net/smartcontract/dbs/event tests May 5, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2375 (4012a27) into staging (893baf7) will not change coverage.
The diff coverage is n/a.

馃摚 This organization is not using Codecov鈥檚 GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff            @@
##           staging    #2375   +/-   ##
========================================
  Coverage    28.96%   28.96%           
========================================
  Files          377      377           
  Lines        63076    63076           
========================================
  Hits         18273    18273           
  Misses       42657    42657           
  Partials      2146     2146           
Flag Coverage 螖
Unit-Tests 28.96% <酶> (酶)

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

see 1 file with indirect coverage changes

Copy link
Member

@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

@peterlimg peterlimg merged commit 1706151 into staging May 5, 2023
8 checks passed
@peterlimg peterlimg deleted the fix/unit-testing-script branch May 5, 2023 11:11
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.

None yet

3 participants