Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CapacitorSet committed Aug 9, 2018
1 parent 3093a41 commit 926e43b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ install:
- sudo apt-get update -qq
- sudo apt-get install -y software-properties-common python-software-properties lxc-dev
- go get -u -v gopkg.in/alecthomas/gometalinter.v2
- go get -u -v github.com/antchfx/xmlquery # Used in tests
- go get -u -v github.com/honeytrap/honeytrap
- gometalinter.v2 --install

Expand Down
8 changes: 7 additions & 1 deletion tests/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ import (
"github.com/antchfx/xmlquery"
"testing"
"time"
"io/ioutil"
)

func newTmpFilename() string {
return path.Join(os.TempDir(), "honeytrap-tests-"+uuid.Must(uuid.NewV4()).String())
f, err := ioutil.TempFile("", "honeytrap-tests-")
if err != nil {
panic(err)
}
f.Close()
return f.Name()
}

// Generates a TOML config for a port linked to a single service.
Expand Down

0 comments on commit 926e43b

Please sign in to comment.