File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44 "math/rand"
55 "strconv"
66 "testing"
7+ "time"
78
89 "github.com/gruntwork-io/terratest/modules/terraform"
910 "github.com/stretchr/testify/assert"
@@ -13,8 +14,9 @@ import (
1314func TestExamplesComplete (t * testing.T ) {
1415 t .Parallel ()
1516
16- randId := strconv .Itoa (rand .Intn (100000 ))
17- attributes := []string {randId }
17+ rand .Seed (time .Now ().UnixNano ())
18+ randID := strconv .Itoa (rand .Intn (100000 ))
19+ attributes := []string {randID }
1820
1921 exampleInput := "Hello, world!"
2022
@@ -46,7 +48,7 @@ func TestExamplesComplete(t *testing.T) {
4648 // Ensure we get a random number appended
4749 assert .Equal (t , exampleInput + " " + random , example )
4850 // Ensure we get the attribute included in the ID
49- assert .Equal (t , "eg-ue2-test-example-" + randId , id )
51+ assert .Equal (t , "eg-ue2-test-example-" + randID , id )
5052
5153 // ************************************************************************
5254 // This steps below are unusual, not generally part of the testing
You can’t perform that action at this time.
0 commit comments