fix: add retry logic to acc tests

main
William Beuil 2022-04-07 15:23:19 +02:00
parent 181e8a1a1b
commit 8400a9840d
No known key found for this signature in database
GPG Key ID: BED2072C5C2BF537
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ func TestAcc_Aws_Route(t *testing.T) {
Env: map[string]string{ Env: map[string]string{
"AWS_REGION": "us-east-1", "AWS_REGION": "us-east-1",
}, },
ShouldRetry: acceptance.LinearBackoff(10 * time.Minute),
Check: func(result *test.ScanResult, stdout string, err error) { Check: func(result *test.ScanResult, stdout string, err error) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)

View File

@ -2,6 +2,7 @@ package aws_test
import ( import (
"testing" "testing"
"time"
"github.com/snyk/driftctl/test" "github.com/snyk/driftctl/test"
"github.com/snyk/driftctl/test/acceptance" "github.com/snyk/driftctl/test/acceptance"
@ -17,6 +18,7 @@ func TestAcc_Aws_Subnet(t *testing.T) {
Env: map[string]string{ Env: map[string]string{
"AWS_REGION": "us-east-1", "AWS_REGION": "us-east-1",
}, },
ShouldRetry: acceptance.LinearBackoff(10 * time.Minute),
Check: func(result *test.ScanResult, stdout string, err error) { Check: func(result *test.ScanResult, stdout string, err error) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)