Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry when the ingress is not ready #510

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/e2e/terraform_aks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"regexp"
"strings"
"testing"
"time"

"github.com/hashicorp/go-retryablehttp"

Expand Down Expand Up @@ -157,6 +158,11 @@ func TestExamples_applicationGatewayIngress(t *testing.T) {
"use_brown_field_application_gateway": u.useBrownFieldAppGw,
"create_role_assignments_for_application_gateway": u.createRoleBindingForAppGw,
},
MaxRetries: 20,
TimeBetweenRetries: time.Minute,
RetryableTerraformErrors: map[string]string{
".*is empty list of object.*": "the ingress hasn't been created, need more time",
},
}, func(t *testing.T, output test_helper.TerraformOutput) {
url, ok := output["ingress_endpoint"].(string)
require.True(t, ok)
Expand Down
6 changes: 6 additions & 0 deletions test/upgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"testing"
"time"

test_helper "github.com/Azure/terraform-module-test-helper"
"github.com/gruntwork-io/terratest/modules/terraform"
Expand Down Expand Up @@ -138,6 +139,11 @@ func TestExampleUpgrade_applicationGw(t *testing.T) {
"use_brown_field_application_gateway": u.useBrownFieldAppGw,
"create_role_assignments_for_application_gateway": u.createRoleBindingForAppGw,
},
MaxRetries: 20,
TimeBetweenRetries: time.Minute,
RetryableTerraformErrors: map[string]string{
".*is empty list of object.*": "the ingress hasn't been created, need more time",
},
}, currentMajorVersion)
})
}
Expand Down
Loading