fix node unit tests (#416)

Fix tests that broke after introducing #414
This commit is contained in:
Adam Babik 2017-10-19 15:45:14 +02:00 committed by Ivan Tomilov
parent 2e9302c631
commit ad9a8777a8
3 changed files with 9 additions and 7 deletions

View File

@ -310,8 +310,8 @@ var loadConfigTestCases = []struct {
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) { func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
require.NoError(t, err) require.NoError(t, err)
require.True(t, nodeConfig.BootClusterConfig.Enabled, "boot cluster is expected to be enabled by default") require.True(t, nodeConfig.BootClusterConfig.Enabled, "boot cluster is expected to be enabled by default")
require.Equal(t, "f946d8f4d46d5b8a68006485cef0d1583db4a45feab83661323d4d52000aa2db", nodeConfig.BootClusterConfig.RootHash) require.Equal(t, "", nodeConfig.BootClusterConfig.RootHash)
require.Equal(t, 205, nodeConfig.BootClusterConfig.RootNumber) require.Equal(t, 0, nodeConfig.BootClusterConfig.RootNumber)
enodes := nodeConfig.BootClusterConfig.BootNodes enodes := nodeConfig.BootClusterConfig.BootNodes
expectedEnodes := []string{ expectedEnodes := []string{
@ -332,8 +332,8 @@ var loadConfigTestCases = []struct {
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) { func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
require.NoError(t, err) require.NoError(t, err)
require.True(t, nodeConfig.BootClusterConfig.Enabled, "boot cluster is expected to be enabled by default") require.True(t, nodeConfig.BootClusterConfig.Enabled, "boot cluster is expected to be enabled by default")
require.Equal(t, "f946d8f4d46d5b8a68006485cef0d1583db4a45feab83661323d4d52000aa2db", nodeConfig.BootClusterConfig.RootHash) require.Equal(t, "", nodeConfig.BootClusterConfig.RootHash)
require.Equal(t, 205, nodeConfig.BootClusterConfig.RootNumber) require.Equal(t, 0, nodeConfig.BootClusterConfig.RootNumber)
enodes := nodeConfig.BootClusterConfig.BootNodes enodes := nodeConfig.BootClusterConfig.BootNodes
expectedEnodes := []string{ expectedEnodes := []string{

View File

@ -27,6 +27,8 @@
}, },
"BootClusterConfig": { "BootClusterConfig": {
"Enabled": true, "Enabled": true,
"RootNumber": 0,
"RootHash": "",
"BootNodes": [ "BootNodes": [
"enode://7512c8f6e7ffdcc723cf77e602a1de9d8cc2e8ad35db309464819122cd773857131aee390fec33894db13da730c8432bb248eed64039e3810e156e979b2847cb@51.15.78.243:30303", "enode://7512c8f6e7ffdcc723cf77e602a1de9d8cc2e8ad35db309464819122cd773857131aee390fec33894db13da730c8432bb248eed64039e3810e156e979b2847cb@51.15.78.243:30303",
"enode://1cc27a5a41130a5c8b90db5b2273dc28f7b56f3edfc0dcc57b665d451274b26541e8de49ea7a074281906a82209b9600239c981163b6ff85c3038a8e2bc5d8b8@51.15.68.93:30303", "enode://1cc27a5a41130a5c8b90db5b2273dc28f7b56f3edfc0dcc57b665d451274b26541e8de49ea7a074281906a82209b9600239c981163b6ff85c3038a8e2bc5d8b8@51.15.68.93:30303",

View File

@ -121,7 +121,7 @@ func scriptsWeb3Js() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "scripts/web3.js", size: 497689, mode: os.FileMode(420), modTime: time.Unix(1508342151, 0)} info := bindataFileInfo{name: "scripts/web3.js", size: 497689, mode: os.FileMode(420), modTime: time.Unix(1508419129, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@ -141,7 +141,7 @@ func configChtJson() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "config/cht.json", size: 7418, mode: os.FileMode(420), modTime: time.Unix(1508338623, 0)} info := bindataFileInfo{name: "config/cht.json", size: 7418, mode: os.FileMode(420), modTime: time.Unix(1508419094, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@ -181,7 +181,7 @@ func configStatusChainGenesisJson() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "config/status-chain-genesis.json", size: 610, mode: os.FileMode(420), modTime: time.Unix(1508231709, 0)} info := bindataFileInfo{name: "config/status-chain-genesis.json", size: 610, mode: os.FileMode(420), modTime: time.Unix(1508410633, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }