You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
531 B

  1. package batchbuilder
  2. import (
  3. "io/ioutil"
  4. "testing"
  5. "github.com/hermeznetwork/hermez-node/db/statedb"
  6. "github.com/stretchr/testify/assert"
  7. "github.com/stretchr/testify/require"
  8. )
  9. func TestBatchBuilder(t *testing.T) {
  10. dir, err := ioutil.TempDir("", "tmpdb")
  11. require.Nil(t, err)
  12. synchDB, err := statedb.NewStateDB(dir, statedb.TypeBatchBuilder, 0)
  13. assert.Nil(t, err)
  14. bbDir, err := ioutil.TempDir("", "tmpBatchBuilderDB")
  15. require.Nil(t, err)
  16. _, err = NewBatchBuilder(bbDir, synchDB, nil, 0, 32)
  17. assert.Nil(t, err)
  18. }