Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Add trace plugin API test - #9194

Merged
allenhan2 merged 10 commits into
developfrom
trace_plugin_test
Jun 16, 2020
Merged

allenhan2 merged 10 commits into
developfrom
trace_plugin_test

Conversation

@allenhan2

@allenhan2 allenhan2 commented Jun 10, 2020 •

Copy link
Copy Markdown
Contributor

Change Description

Testing:

  1. Start Nodeos and Keosd
  2. send transaction
  3. get transaction id and block number
  4. call trace API to get block, and verify transaction is in the block data

Jira: https://blockone.atlassian.net/browse/EPE-104

Change Type

Select ONE

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Comment thread tests/Cluster.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Resolved
Comment thread tests/trace_plugin_test.py Outdated

@classmethod
def tearDownClass(self):
self.cleanEnv(self)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

either need to check if test passed or just don't call cleanup() when tearing down

Comment thread tests/trace_plugin_test.py Outdated

self.assertEqual(node.getAccountEosBalanceStr(self.accounts[0].name), Utils.deduceAmount(expectedAmount, xferAmount))
self.assertEqual(node.getAccountEosBalanceStr(self.accounts[1].name), Utils.addAmount(expectedAmount, xferAmount))
ret_json = self.get_block(blockNum, node)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

before this, call node.getBlock(blockNum) to retrieve the block and verify that you can find the transaction id in the block, this way if this test case ever fails, we will know whether the problem is in trace_api or before it.

@allenhan2
allenhan2 merged commit 85302a6 into develop Jun 16, 2020
@allenhan2
allenhan2 deleted the trace_plugin_test branch June 16, 2020 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants