mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
*: upgrade tests to use T.Cleanup()
This commit is contained in:
parent
0cec99a3ea
commit
2c81fc8b8e
41 changed files with 137 additions and 220 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
|
||||
func TestLedgerGetTransactionHeight(t *testing.T) {
|
||||
_, tx, _, chain := createVMAndTX(t)
|
||||
defer chain.Close()
|
||||
|
||||
ledger := chain.contracts.ByName(nativenames.Ledger).Metadata().Hash
|
||||
|
||||
|
@ -39,7 +38,6 @@ func TestLedgerGetTransactionHeight(t *testing.T) {
|
|||
|
||||
func TestLedgerGetTransaction(t *testing.T) {
|
||||
_, tx, _, chain := createVMAndTX(t)
|
||||
defer chain.Close()
|
||||
ledger := chain.contracts.ByName(nativenames.Ledger).Metadata().Hash
|
||||
|
||||
t.Run("success", func(t *testing.T) {
|
||||
|
@ -80,7 +78,6 @@ func TestLedgerGetTransaction(t *testing.T) {
|
|||
|
||||
func TestLedgerGetTransactionFromBlock(t *testing.T) {
|
||||
chain := newTestChain(t)
|
||||
defer chain.Close()
|
||||
ledger := chain.contracts.ByName(nativenames.Ledger).Metadata().Hash
|
||||
|
||||
res, err := invokeContractMethod(chain, 100000000, ledger, "currentIndex") // adds a block
|
||||
|
@ -132,7 +129,6 @@ func TestLedgerGetTransactionFromBlock(t *testing.T) {
|
|||
|
||||
func TestLedgerGetBlock(t *testing.T) {
|
||||
chain := newTestChain(t)
|
||||
defer chain.Close()
|
||||
ledger := chain.contracts.ByName(nativenames.Ledger).Metadata().Hash
|
||||
|
||||
bhash := chain.GetHeaderHash(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue