diff --git a/command/agent/testagent.go b/command/agent/testagent.go index f911142fde..789bfa9c22 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -25,7 +25,8 @@ func init() { rand.Seed(time.Now().UnixNano()) // seed random number generator } -var TempDir = "/tmp" +// TempDir defines the base dir for temporary directories. +var TempDir = os.TempDir() // TestAgent encapsulates an Agent with a default configuration and // startup procedure suitable for testing. It panics if there are errors