|
|
@ -78,9 +78,10 @@ func TestHarmonyFlags(t *testing.T) { |
|
|
|
RequestsPerSecond: 1000, |
|
|
|
RequestsPerSecond: 1000, |
|
|
|
}, |
|
|
|
}, |
|
|
|
WS: harmonyconfig.WsConfig{ |
|
|
|
WS: harmonyconfig.WsConfig{ |
|
|
|
Enabled: true, |
|
|
|
Enabled: true, |
|
|
|
IP: "127.0.0.1", |
|
|
|
IP: "127.0.0.1", |
|
|
|
Port: 9800, |
|
|
|
Port: 9800, |
|
|
|
|
|
|
|
AuthPort: 9801, |
|
|
|
}, |
|
|
|
}, |
|
|
|
Consensus: &harmonyconfig.ConsensusConfig{ |
|
|
|
Consensus: &harmonyconfig.ConsensusConfig{ |
|
|
|
MinPeers: 6, |
|
|
|
MinPeers: 6, |
|
|
@ -529,25 +530,37 @@ func TestWSFlags(t *testing.T) { |
|
|
|
{ |
|
|
|
{ |
|
|
|
args: []string{"--ws=false"}, |
|
|
|
args: []string{"--ws=false"}, |
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
Enabled: false, |
|
|
|
Enabled: false, |
|
|
|
IP: defaultConfig.WS.IP, |
|
|
|
IP: defaultConfig.WS.IP, |
|
|
|
Port: defaultConfig.WS.Port, |
|
|
|
Port: defaultConfig.WS.Port, |
|
|
|
|
|
|
|
AuthPort: defaultConfig.WS.AuthPort, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
args: []string{"--ws", "--ws.ip", "8.8.8.8", "--ws.port", "9001"}, |
|
|
|
args: []string{"--ws", "--ws.ip", "8.8.8.8", "--ws.port", "9001"}, |
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
Enabled: true, |
|
|
|
Enabled: true, |
|
|
|
IP: "8.8.8.8", |
|
|
|
IP: "8.8.8.8", |
|
|
|
Port: 9001, |
|
|
|
Port: 9001, |
|
|
|
|
|
|
|
AuthPort: defaultConfig.WS.AuthPort, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
args: []string{"--ws", "--ws.ip", "8.8.8.8", "--ws.auth-port", "9001"}, |
|
|
|
|
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
|
|
|
|
Enabled: true, |
|
|
|
|
|
|
|
IP: "8.8.8.8", |
|
|
|
|
|
|
|
Port: defaultConfig.WS.Port, |
|
|
|
|
|
|
|
AuthPort: 9001, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
args: []string{"--ip", "8.8.8.8", "--port", "9001", "--public_rpc"}, |
|
|
|
args: []string{"--ip", "8.8.8.8", "--port", "9001", "--public_rpc"}, |
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
expConfig: harmonyconfig.WsConfig{ |
|
|
|
Enabled: true, |
|
|
|
Enabled: true, |
|
|
|
IP: nodeconfig.DefaultPublicListenIP, |
|
|
|
IP: nodeconfig.DefaultPublicListenIP, |
|
|
|
Port: 9801, |
|
|
|
Port: 9801, |
|
|
|
|
|
|
|
AuthPort: 9802, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|