Commit 2d4fe60e authored by Luke Champine's avatar Luke Champine

use ioutil.TempDir to create testing siaDir

parent 3cbd809a
......@@ -7,6 +7,7 @@ whitepaper.aux
whitepaper.log
whitepaper.pdf
*_test
testdir*
*.wallet*
walletDir*
*.swp
......
......@@ -20,8 +20,8 @@ install: fmt REBUILD
# development.
clean:
rm -rf hostdir release whitepaper.aux whitepaper.log whitepaper.pdf \
*.wallet* *_test */*_test hostdir* siad/walletDir* siad/hostDir* \
info.log
*.wallet* *_test testdir* */*_test hostdir* siad/walletDir* \
siad/hostDir* info.log
# test runs the short tests for Sia, and aims to always take less than 2
# seconds.
......
......@@ -23,11 +23,16 @@ type daemonTester struct {
}
func newDaemonTester(t *testing.T) *daemonTester {
testdir, err := ioutil.TempDir("..", "testdir")
if err != nil {
t.Fatal("Could not create testing dir:", err)
}
dc := DaemonConfig{
APIAddr: ":" + strconv.Itoa(APIPort),
RPCAddr: ":" + strconv.Itoa(RPCPort),
SiaDir: "testdir" + strconv.Itoa(APIPort),
SiaDir: testdir,
}
APIPort++
RPCPort++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment