fiddling with os.TempDir() and travis

This commit is contained in:
Jan Halfar 2016-02-17 14:10:44 +01:00
parent c119afef99
commit 87b3b79626
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"testing"
"github.com/foomo/gofoomo/foomo"
@ -45,7 +46,7 @@ func getTestFoomo() *foomo.Foomo {
if testFoomo == nil {
ts := getTestServer()
tmp := "/tmp" //os.TempDir()
tmp := os.TempDir()
dir, err := ioutil.TempDir(tmp, "dummy-foomo")
poe(err, "failed to get temp dir")
bareFoomo, err := foomo.BareFoomo(dir, "test")

View File

@ -7,6 +7,8 @@ import (
func getTestFoomoForFSStuff() *Foomo {
tempDir := os.TempDir()
//tempDir, err := ioutil.TempDir(tmp, "dummy-foomo")
os.MkdirAll(tempDir[0:len(tempDir)-1], 0777)
f, err := BareFoomo(tempDir[0:len(tempDir)-1], "test")
if err != nil {
panic(err)