diff --git a/pkg/cloud/services/ec2/bastion_test.go b/pkg/cloud/services/ec2/bastion_test.go index f2878af14b..b1f8135992 100644 --- a/pkg/cloud/services/ec2/bastion_test.go +++ b/pkg/cloud/services/ec2/bastion_test.go @@ -17,7 +17,6 @@ limitations under the License. package ec2 import ( - "context" "fmt" "testing" diff --git a/pkg/cloud/services/network/natgateways_test.go b/pkg/cloud/services/network/natgateways_test.go index 5d8583df52..f8cb2cb155 100644 --- a/pkg/cloud/services/network/natgateways_test.go +++ b/pkg/cloud/services/network/natgateways_test.go @@ -17,7 +17,6 @@ limitations under the License. package network import ( - "context" "testing" "github.com/aws/aws-sdk-go/aws" diff --git a/pkg/cloud/services/network/vpc_test.go b/pkg/cloud/services/network/vpc_test.go index 08bbd8daa9..3bd4163499 100644 --- a/pkg/cloud/services/network/vpc_test.go +++ b/pkg/cloud/services/network/vpc_test.go @@ -17,7 +17,6 @@ limitations under the License. package network import ( - "context" "testing" "github.com/aws/aws-sdk-go/aws" diff --git a/pkg/cloud/services/secretsmanager/secret_test.go b/pkg/cloud/services/secretsmanager/secret_test.go index 14e346b639..1cda370a0c 100644 --- a/pkg/cloud/services/secretsmanager/secret_test.go +++ b/pkg/cloud/services/secretsmanager/secret_test.go @@ -17,7 +17,7 @@ limitations under the License. package secretsmanager import ( - "math/rand" + crand "crypto/rand" "sort" "testing" @@ -43,7 +43,7 @@ func TestServiceCreate(t *testing.T) { generateBytes := func(g *WithT, count int64) []byte { token := make([]byte, count) - _, err := rand.Read(token) + _, err := crand.Read(token) g.Expect(err).NotTo(HaveOccurred()) return token } diff --git a/pkg/cloud/services/ssm/secret_test.go b/pkg/cloud/services/ssm/secret_test.go index 16d81d1762..23beaa1d34 100644 --- a/pkg/cloud/services/ssm/secret_test.go +++ b/pkg/cloud/services/ssm/secret_test.go @@ -17,7 +17,7 @@ limitations under the License. package ssm import ( - "math/rand" + crand "crypto/rand" "sort" "strings" "testing" @@ -45,7 +45,7 @@ func TestServiceCreate(t *testing.T) { generateBytes := func(count int64) []byte { token := make([]byte, count) - _, err := rand.Read(token) + _, err := crand.Read(token) if err != nil { t.Fatalf("error while creating data: %v", err) }