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

Add trace plugin API test #9194

Merged
merged 10 commits into from
Jun 16, 2020
Merged

Add trace plugin API test #9194

merged 10 commits into from
Jun 16, 2020

Conversation

allenhan2
Copy link
Contributor

@allenhan2 allenhan2 commented Jun 10, 2020

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

tests/Cluster.py Outdated Show resolved Hide resolved
tests/trace_plugin_test.py Show resolved Hide resolved
tests/trace_plugin_test.py Outdated Show resolved Hide resolved
tests/trace_plugin_test.py Outdated Show resolved Hide resolved
tests/trace_plugin_test.py Show resolved Hide resolved
tests/trace_plugin_test.py Show resolved Hide resolved
tests/trace_plugin_test.py Outdated Show resolved Hide resolved
tests/trace_plugin_test.py Show resolved Hide resolved

@classmethod
def tearDownClass(self):
self.cleanEnv(self)
Copy link
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


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