From 8400a9840d8c2e944edb1b261f6e2ef919b8eabd Mon Sep 17 00:00:00 2001 From: William Beuil Date: Thu, 7 Apr 2022 15:23:19 +0200 Subject: [PATCH] fix: add retry logic to acc tests --- pkg/resource/aws/aws_route_test.go | 1 + pkg/resource/aws/aws_subnet_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/resource/aws/aws_route_test.go b/pkg/resource/aws/aws_route_test.go index 4f556e9f..2661937d 100644 --- a/pkg/resource/aws/aws_route_test.go +++ b/pkg/resource/aws/aws_route_test.go @@ -22,6 +22,7 @@ func TestAcc_Aws_Route(t *testing.T) { Env: map[string]string{ "AWS_REGION": "us-east-1", }, + ShouldRetry: acceptance.LinearBackoff(10 * time.Minute), Check: func(result *test.ScanResult, stdout string, err error) { if err != nil { t.Fatal(err) diff --git a/pkg/resource/aws/aws_subnet_test.go b/pkg/resource/aws/aws_subnet_test.go index 596ee533..c880565b 100644 --- a/pkg/resource/aws/aws_subnet_test.go +++ b/pkg/resource/aws/aws_subnet_test.go @@ -2,6 +2,7 @@ package aws_test import ( "testing" + "time" "github.com/snyk/driftctl/test" "github.com/snyk/driftctl/test/acceptance" @@ -17,6 +18,7 @@ func TestAcc_Aws_Subnet(t *testing.T) { Env: map[string]string{ "AWS_REGION": "us-east-1", }, + ShouldRetry: acceptance.LinearBackoff(10 * time.Minute), Check: func(result *test.ScanResult, stdout string, err error) { if err != nil { t.Fatal(err)