eth-dump-genblock/main_test.go
Roy Crihfield c0655063ab Update geth to 1.14 (#2)
Updates Geth and dependencies, adds a basic unit test.

Reviewed-on: #2
2024-06-21 07:48:16 +00:00

19 lines
353 B
Go

package main
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestMain(t *testing.T) {
args := []string{"eth-dump-genblock", "testdata/genesis.json"}
blockJSON := Main(args)
expected, err := os.ReadFile("testdata/genesis_block.json")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, string(blockJSON), string(expected))
}