Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Apr 1, 2021
1 parent 2cf1b29 commit 37d3815
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion dot/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
"github.com/stretchr/testify/require"
)

// TestInitNode
func TestInitNode(t *testing.T) {
cfg := NewTestConfig(t)
require.NotNil(t, cfg)
Expand All @@ -57,6 +56,21 @@ func TestInitNode(t *testing.T) {
require.NoError(t, err)
}

func TestInitNode_GenesisSpec(t *testing.T) {
cfg := NewTestConfig(t)
require.NotNil(t, cfg)

genFile := NewTestGenesisFile(t, cfg)
require.NotNil(t, genFile)

defer utils.RemoveTestDir(t)

cfg.Init.Genesis = genFile.Name()

err := InitNode(cfg)
require.NoError(t, err)
}

// TestNodeInitialized
func TestNodeInitialized(t *testing.T) {
cfg := NewTestConfig(t)
Expand Down

0 comments on commit 37d3815

Please sign in to comment.