Skip to content
Open
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: 4 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ jobs:
terraform_version: '1.7.*'
terraform_wrapper: false
- name: Terraform Acceptance Test (APIC ${{ matrix.apic_host.name }})
run: go test github.com/CiscoDevNet/terraform-provider-aci/v2/internal/provider -v -timeout 300m -coverprofile=coverage.out -covermode=atomic
# TODO: Fix TestAccAciRestManaged_importWithIpv6 to resolve data race failures occurring in the CI
# https://github.com/CiscoDevNet/terraform-provider-aci/issues/1218
run: go test github.com/CiscoDevNet/terraform-provider-aci/v2/internal/provider -v -race -timeout 300m -coverprofile=coverage.out -covermode=atomic -skip TestAccAciRestManaged_importWithIpv6
env:
TF_ACC: '1'
TF_ACC_STATE_LINEAGE: '1'
Expand All @@ -87,4 +89,4 @@ jobs:
if: ${{ matrix.apic_host.name == 'v6.0'}}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
22 changes: 22 additions & 0 deletions internal/provider/resource_aci_rest_managed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,17 @@ func TestAccAciRestManaged_import(t *testing.T) {
resource.TestCheckResourceAttr("aci_rest_managed.import", "child.#", "2"),
),
},
},
})
}

func TestAccAciRestManaged_importWithIpv6(t *testing.T) {
name := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccAciRestManagedConfig_importWithIpv6(name, "import", "2001:1:2::5/28", "2001:1:2::5/28"),
Check: resource.ComposeTestCheckFunc(
Expand Down Expand Up @@ -388,6 +399,17 @@ func TestAccAciRestManaged_import(t *testing.T) {
resource.TestCheckResourceAttr("aci_rest_managed.bd_import_2", "child.1.content.tnFvCtxName", "VRF2"),
),
},
},
})
}

func TestAccAciRestManaged_importWithBracket(t *testing.T) {
name := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccAciRestManagedConfig_importWithBracket(name),
Check: resource.ComposeTestCheckFunc(
Expand Down