Skip to content

Commit

Permalink
mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 committed Sep 17, 2024
1 parent 1234dee commit c588cc3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions e2etest/test_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ func StartManager(t *testing.T, numMatureOutputsInWallet uint32, epochInterval u

// start Babylon node

tmpDir := t.TempDir()
err = os.Chmod(tmpDir, 0755)
tmpDir, err := tempDir()
require.NoError(t, err)

babylond, err := manager.RunBabylondResource(t, tmpDir, baseHeaderHex, hex.EncodeToString(pkScript), epochInterval)
Expand Down Expand Up @@ -275,3 +274,16 @@ func importPrivateKey(btcHandler *BitcoindTestHandler) (*btcec.PrivateKey, error

return privKey, nil
}

func tempDir() (string, error) {
tempName, err := os.MkdirTemp(os.TempDir(), "BabylonTestVigilante")
if err != nil {
return "", err
}

if err = os.Chmod(tempName, 0755); err != nil {
return "", err
}

return tempName, nil
}

0 comments on commit c588cc3

Please sign in to comment.