From b75d561c56e88b3b930fbb74e0ebb871bd5975ab Mon Sep 17 00:00:00 2001 From: Christopher Gerber Date: Thu, 4 Feb 2016 16:12:18 -0600 Subject: [PATCH] Fixes more windows testing errors. "constant 9999999999 overflows int" running test on CI server. Replaced with timestamp to unixnano --- builder/amazon/common/cli_config_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/builder/amazon/common/cli_config_test.go b/builder/amazon/common/cli_config_test.go index def93bbb8..8ef775163 100644 --- a/builder/amazon/common/cli_config_test.go +++ b/builder/amazon/common/cli_config_test.go @@ -2,7 +2,6 @@ package common import ( "io/ioutil" - "math/rand" "os" "path" "strconv" @@ -71,10 +70,8 @@ func TestAssumeRole(t *testing.T) { } func mockConfig(t *testing.T) string { - time := rand.NewSource(time.Now().UnixNano()) - r := rand.New(time) - v := r.Intn(9999999999) - dir, err := ioutil.TempDir("", strconv.Itoa(v)) + time := time.Now().UnixNano() + dir, err := ioutil.TempDir("", strconv.Itoa(time)) if err != nil { t.Error(err) }