lntest/node: adds SetExtraArgs to change node behavior after restart

This commit is contained in:
Conner Fromknecht 2018-02-22 14:27:24 -08:00
parent 90dec0ad6a
commit 4bff32232c
No known key found for this signature in database
GPG Key ID: 39DE78FBE6ACB0EF
1 changed files with 6 additions and 0 deletions

View File

@ -395,6 +395,12 @@ func (hn *HarnessNode) connectRPC() (*grpc.ClientConn, error) {
return grpc.Dial(hn.cfg.RPCAddr(), opts...)
}
// SetExtraArgs assigns the ExtraArgs field for the node's configuration. The
// changes will take effect on restart.
func (hn *HarnessNode) SetExtraArgs(extraArgs []string) {
hn.cfg.ExtraArgs = extraArgs
}
// cleanup cleans up all the temporary files created by the node's process.
func (hn *HarnessNode) cleanup() error {
return os.RemoveAll(hn.cfg.BaseDir)