Skip to content

Commit

Permalink
Merge pull request #32 from hashicorp/main
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
mbialon authored Sep 28, 2023
2 parents 8337756 + 7d44f7e commit cc91c74
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package servicenetworking_test
import (
"context"
"fmt"
"regexp"
"testing"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
Expand Down Expand Up @@ -41,7 +42,7 @@ func TestAccApplicationLoadBalancer_basic(t *testing.T) {
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("configuration_endpoint.#").HasValue("1"),
check.That(data.ResourceName).Key("primary_configuration_endpoint").MatchesRegex(regexp.MustCompile(`^.+\.alb.azure.com$`)),
),
},
data.ImportStep(),
Expand All @@ -57,7 +58,7 @@ func TestAccApplicationLoadBalancer_complete(t *testing.T) {
Config: r.complete(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("primary_configuration_endpoint").HasValue("1"),
check.That(data.ResourceName).Key("primary_configuration_endpoint").MatchesRegex(regexp.MustCompile(`^.+\.alb.azure.com$`)),
),
},
data.ImportStep(),
Expand All @@ -73,15 +74,15 @@ func TestAccApplicationLoadBalancer_update(t *testing.T) {
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("configuration_endpoint.#").HasValue("1"),
check.That(data.ResourceName).Key("primary_configuration_endpoint").MatchesRegex(regexp.MustCompile(`^.+\.alb.azure.com$`)),
),
},
data.ImportStep(),
{
Config: r.complete(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("configuration_endpoint.#").HasValue("1"),
check.That(data.ResourceName).Key("primary_configuration_endpoint").MatchesRegex(regexp.MustCompile(`^.+\.alb.azure.com$`)),
),
},
data.ImportStep(),
Expand All @@ -97,7 +98,7 @@ func TestAccApplicationLoadBalancer_requiresImport(t *testing.T) {
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("configuration_endpoint.#").HasValue("1"),
check.That(data.ResourceName).Key("primary_configuration_endpoint").MatchesRegex(regexp.MustCompile(`^.+\.alb.azure.com$`)),
),
},
data.RequiresImportErrorStep(r.requiresImport),
Expand Down

0 comments on commit cc91c74

Please sign in to comment.