@@ -4,13 +4,13 @@ package test
44import (
55 "encoding/json"
66 "fmt"
7- "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
8- "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons"
97 "log"
10- "math/rand"
118 "os"
129 "testing"
1310
11+ "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
12+ "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons"
13+
1414 "github.com/IBM/go-sdk-core/v5/core"
1515 "github.com/stretchr/testify/assert"
1616 "github.com/stretchr/testify/require"
@@ -54,7 +54,7 @@ func TestMain(m *testing.M) {
5454func TestFSCloudInSchematics (t * testing.T ) {
5555 t .Parallel ()
5656
57- var region = validRegions [rand . Intn (len (validRegions ))]
57+ var region = validRegions [common . CryptoIntn (len (validRegions ))]
5858
5959 options := testschematic .TestSchematicOptionsDefault (& testschematic.TestSchematicOptions {
6060 Testing : t ,
@@ -89,7 +89,7 @@ func TestFSCloudInSchematics(t *testing.T) {
8989func TestSecurityEnforcedDAInSchematics (t * testing.T ) {
9090 t .Parallel ()
9191
92- var region = validRegions [rand . Intn (len (validRegions ))]
92+ var region = validRegions [common . CryptoIntn (len (validRegions ))]
9393
9494 options := testschematic .TestSchematicOptionsDefault (& testschematic.TestSchematicOptions {
9595 Testing : t ,
@@ -172,7 +172,7 @@ func TestRunSecurityEnforcedUpgradeDASolution(t *testing.T) {
172172 Tags : []string {"test-schematic" },
173173 DeleteWorkspaceOnFail : false ,
174174 WaitJobCompleteMinutes : 60 ,
175- Region : validRegions [rand . Intn (len (validRegions ))],
175+ Region : validRegions [common . CryptoIntn (len (validRegions ))],
176176 CheckApplyResultForUpgrade : true ,
177177 TerraformVersion : terraformVersion ,
178178 })
@@ -207,7 +207,7 @@ func TestAddonDefaultConfiguration(t *testing.T) {
207207 "deploy-arch-ibm-event-notifications" ,
208208 "fully-configurable" ,
209209 map [string ]interface {}{
210- "region" : validRegions [rand . Intn (len (validRegions ))],
210+ "region" : validRegions [common . CryptoIntn (len (validRegions ))],
211211 "existing_resource_group" : resourceGroup ,
212212 },
213213 )
0 commit comments