mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
Merge pull request #8590 from ffranr/test-node-name-in-tmpdir
lntest: add test node name to tmp directory name
This commit is contained in:
commit
8ce3622792
@ -97,7 +97,12 @@ type HarnessNode struct {
|
||||
func NewHarnessNode(t *testing.T, cfg *BaseNodeConfig) (*HarnessNode, error) {
|
||||
if cfg.BaseDir == "" {
|
||||
var err error
|
||||
cfg.BaseDir, err = ioutil.TempDir("", "lndtest-node")
|
||||
|
||||
// Create a temporary directory for the node's data and logs.
|
||||
// Use dash suffix as a separator between base name and random
|
||||
// suffix.
|
||||
dirBaseName := fmt.Sprintf("lndtest-node-%s-", cfg.Name)
|
||||
cfg.BaseDir, err = os.MkdirTemp("", dirBaseName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user