Skip to content

Integration Tests: balance, tx-history, address-info and transaction routes #149

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 40 commits into from
Mar 3, 2022

Conversation

tuliomir
Copy link
Contributor

This pull request is the first phase of the implementation of Integration Tests on the Hathor Wallet Headless, and lays the foundation for easily expanding the test scenarios in the future.

In short, on each PR the Github Actions were configured to run a docker-compose starting a Hathor private network, as described in the private network guide, and then runs a series of tests on this network, validating the integration between the wallet and the network as a whole.

Acceptance Criteria

  • Run the integration tests on the following routes:
    • /wallet/transaction
    • /wallet/address-info
    • /wallet/tx-history
    • /wallet/balance
  • The tests must be run on every PR and commit made on dev and master branches

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@tuliomir tuliomir self-assigned this Feb 21, 2022
@lgtm-com
Copy link

lgtm-com bot commented Feb 21, 2022

This pull request introduces 1 alert when merging b1b6637 into fd1ebaa - view on LGTM.com

new alerts:

  • 1 for Duplicate property

@lgtm-com
Copy link

lgtm-com bot commented Feb 22, 2022

This pull request fixes 1 alert when merging c0f84c5 into fd1ebaa - view on LGTM.com

fixed alerts:

  • 1 for Duplicate property

@lgtm-com
Copy link

lgtm-com bot commented Feb 22, 2022

This pull request fixes 1 alert when merging 97840f3 into fd1ebaa - view on LGTM.com

fixed alerts:

  • 1 for Duplicate property

@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #149 (72f8898) into dev (fd1ebaa) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #149   +/-   ##
=======================================
  Coverage   81.03%   81.03%           
=======================================
  Files           7        7           
  Lines         464      464           
  Branches      103      103           
=======================================
  Hits          376      376           
  Misses         80       80           
  Partials        8        8           

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 fd1ebaa...72f8898. Read the comment docs.

@tuliomir tuliomir changed the title Integration Tests part 1 Integration Tests: balance, tx-history, address-info and transaction routes Feb 22, 2022
@lgtm-com
Copy link

lgtm-com bot commented Feb 25, 2022

This pull request fixes 1 alert when merging 080bc76 into fd1ebaa - view on LGTM.com

fixed alerts:

  • 1 for Duplicate property

}

// Log the success and return
loggers.test.informNewWallet(walletObj.walletId, walletObj.words)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't you catch all errors on the insertLineToLog method, and log them?

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 on 7e43ad6

@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
@tuliomir tuliomir requested a review from andreabadesso March 3, 2022 15:11
Note: When on Github, the config "outputFolder" property should match
the one specified on the integration-test.yml workflow. Otherwise, the
test artifacts will not be correctly uploaded
@tuliomir tuliomir requested a review from andreabadesso March 3, 2022 15:50
@HathorNetwork HathorNetwork deleted a comment from lgtm-com bot Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants