diff --git a/testacc/data_source_aci_vzFilter_test.go b/testacc/data_source_aci_vzFilter_test.go index 9f8baffe5..21fc97cf8 100644 --- a/testacc/data_source_aci_vzFilter_test.go +++ b/testacc/data_source_aci_vzFilter_test.go @@ -10,9 +10,9 @@ import ( ) func TestAccAciFilterDataSource_Basic(t *testing.T) { - resourceName := "aci_filter.test" - dataSourceName := "data.aci_filter.test" - randomParameter := acctest.RandStringFromCharSet(5, "abcdefghijklmnopqrstuvwxyz") + resourceName := "aci_filter.test" + dataSourceName := "data.aci_filter.test" + randomParameter := acctest.RandStringFromCharSet(5, "abcdefghijklmnopqrstuvwxyz") randomValue := acctest.RandString(5) rName := makeTestVariable(acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ @@ -21,19 +21,19 @@ func TestAccAciFilterDataSource_Basic(t *testing.T) { CheckDestroy: testAccCheckAciFilterDestroy, Steps: []resource.TestStep{ { - Config: CreateAccFilterDSWithoutTenant(rName), - ExpectError: regexp.MustCompile(`Missing required argument`), + Config: CreateAccFilterDSWithoutTenant(rName), + ExpectError: regexp.MustCompile(`Missing required argument`), }, { - Config: CreateAccFilterDSWithoutName(rName), + Config: CreateAccFilterDSWithoutName(rName), ExpectError: regexp.MustCompile(`Missing required argument`), }, { - Config: CreateAccFilterConfigDataSource(rName), + Config: CreateAccFilterConfigDataSource(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrPair(dataSourceName, "description", resourceName, "description"), - resource.TestCheckResourceAttrPair(dataSourceName, "name_alias", resourceName, "name_alias"), - resource.TestCheckResourceAttrPair(dataSourceName, "annotation", resourceName, "annotation"), + resource.TestCheckResourceAttrPair(dataSourceName, "description", resourceName, "description"), + resource.TestCheckResourceAttrPair(dataSourceName, "name_alias", resourceName, "name_alias"), + resource.TestCheckResourceAttrPair(dataSourceName, "annotation", resourceName, "annotation"), resource.TestCheckResourceAttrPair(dataSourceName, "tenant_dn", resourceName, "tenant_dn"), resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"), @@ -44,8 +44,8 @@ func TestAccAciFilterDataSource_Basic(t *testing.T) { ExpectError: regexp.MustCompile(`An argument named (.)+ is not expected here.`), }, { - Config: CreateAccFilterDSWithInvalidName(rName), - ExpectError: regexp.MustCompile(`(.)+ Object may not exists`), + Config: CreateAccFilterDSWithInvalidName(rName), + ExpectError: regexp.MustCompile(`(.)+ Object may not exists`), }, { Config: CreateAccFilterDataSourceUpdate(rName, "description", "description"), diff --git a/testacc/resource_aci_fvap_test.go b/testacc/resource_aci_fvap_test.go index efa3c3968..8835a3ef4 100644 --- a/testacc/resource_aci_fvap_test.go +++ b/testacc/resource_aci_fvap_test.go @@ -58,8 +58,8 @@ func TestAccAciApplicationProfile_Basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "description", "from terraform"), // comparing description with value which is given in configuration resource.TestCheckResourceAttr(resourceName, "name_alias", "test_ap"), // comparing name_alias with value which is given in configuration resource.TestCheckResourceAttr(resourceName, "relation_fv_rs_ap_mon_pol", ""), - resource.TestCheckResourceAttr(resourceName, "annotation", "tag"), // comparing annotation with value which is given in configuration - resource.TestCheckResourceAttr(resourceName, "prio", "level1"), // comparing prio with value which is given in configuration + resource.TestCheckResourceAttr(resourceName, "annotation", "tag"), // comparing annotation with value which is given in configuration + resource.TestCheckResourceAttr(resourceName, "prio", "level1"), // comparing prio with value which is given in configuration resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", rName)), testAccCheckAciApplicationProfileIdEqual(&application_profile_default, &application_profile_updated), // this function will check whether id or dn of both resource are same or not to make sure updation is performed on the same resource diff --git a/testacc/resource_aci_vzfilter_test.go b/testacc/resource_aci_vzfilter_test.go index 2b0895def..e72d5f3e7 100644 --- a/testacc/resource_aci_vzfilter_test.go +++ b/testacc/resource_aci_vzfilter_test.go @@ -36,33 +36,33 @@ func TestAccAciFilter_Basic(t *testing.T) { ExpectError: regexp.MustCompile(`Missing required argument`), }, { - - Config: CreateAccFilterConfig(rName), + + Config: CreateAccFilterConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAciFilterExists(resourceName, &filter_default), - resource.TestCheckResourceAttr(resourceName, "description", ""), + testAccCheckAciFilterExists(resourceName, &filter_default), + resource.TestCheckResourceAttr(resourceName, "description", ""), resource.TestCheckResourceAttr(resourceName, "name_alias", ""), resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_filt_graph_att", ""), resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_fwd_r_flt_p_att", ""), - resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_rev_r_flt_p_att", ""), - resource.TestCheckResourceAttr(resourceName, "annotation", "orchestrator:terraform"), + resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_rev_r_flt_p_att", ""), + resource.TestCheckResourceAttr(resourceName, "annotation", "orchestrator:terraform"), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", rName)), ), }, { - Config: CreateAccFilterConfigWithOptionalValues(rName), + Config: CreateAccFilterConfigWithOptionalValues(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAciFilterExists(resourceName, &filter_updated), - resource.TestCheckResourceAttr(resourceName, "description", "From Terraform"), - resource.TestCheckResourceAttr(resourceName, "name_alias", "alias_filter"), + resource.TestCheckResourceAttr(resourceName, "description", "From Terraform"), + resource.TestCheckResourceAttr(resourceName, "name_alias", "alias_filter"), resource.TestCheckResourceAttr(resourceName, "annotation", "tag_filter"), resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_filt_graph_att", ""), resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_fwd_r_flt_p_att", ""), resource.TestCheckResourceAttr(resourceName, "relation_vz_rs_rev_r_flt_p_att", ""), resource.TestCheckResourceAttr(resourceName, "name", rName), - resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", rName)), - testAccCheckAciFilterIdEqual(&filter_default, &filter_updated), + resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", rName)), + testAccCheckAciFilterIdEqual(&filter_default, &filter_updated), ), }, { @@ -75,28 +75,28 @@ func TestAccAciFilter_Basic(t *testing.T) { ExpectError: regexp.MustCompile(`Missing required argument`), }, { - Config: CreateAccFilterConfigUpdatedName(rName, longrName), + Config: CreateAccFilterConfigUpdatedName(rName, longrName), ExpectError: regexp.MustCompile(fmt.Sprintf("property name of flt-%s failed validation for value '%s'", longrName, longrName)), }, { - Config: CreateAccFilterConfigWithParentAndName(rName, rOther), + Config: CreateAccFilterConfigWithParentAndName(rName, rOther), Check: resource.ComposeTestCheckFunc( testAccCheckAciFilterExists(resourceName, &filter_updated), - resource.TestCheckResourceAttr(resourceName, "name", rOther), - resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", rName)), - testAccCheckAciFilterIdNotEqual(&filter_default, &filter_updated), + resource.TestCheckResourceAttr(resourceName, "name", rOther), + resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", rName)), + testAccCheckAciFilterIdNotEqual(&filter_default, &filter_updated), ), }, { - Config: CreateAccFilterConfig(rName), + Config: CreateAccFilterConfig(rName), }, { - Config: CreateAccFilterConfigWithParentAndName(prOther, rName), + Config: CreateAccFilterConfigWithParentAndName(prOther, rName), Check: resource.ComposeTestCheckFunc( testAccCheckAciFilterExists(resourceName, &filter_updated), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tenant_dn", fmt.Sprintf("uni/tn-%s", prOther)), - testAccCheckAciFilterIdNotEqual(&filter_default, &filter_updated), + testAccCheckAciFilterIdNotEqual(&filter_default, &filter_updated), ), }, }, @@ -106,41 +106,41 @@ func TestAccAciFilter_Basic(t *testing.T) { func TestAccFilter_NegativeCases(t *testing.T) { rName := makeTestVariable(acctest.RandString(5)) - longDescAnnotation := acctest.RandString(129) - longNameAlias := acctest.RandString(64) - randomParameter := acctest.RandStringFromCharSet(5, "abcdefghijklmnopqrstuvwxyz") - randomValue := acctest.RandString(5) + longDescAnnotation := acctest.RandString(129) + longNameAlias := acctest.RandString(64) + randomParameter := acctest.RandStringFromCharSet(5, "abcdefghijklmnopqrstuvwxyz") + randomValue := acctest.RandString(5) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAciFilterDestroy, Steps: []resource.TestStep{ { - Config: CreateAccFilterConfig(rName), + Config: CreateAccFilterConfig(rName), }, { - Config: CreateAccFilterWithInValidTenantDn(rName), - ExpectError: regexp.MustCompile(`unknown property value (.)+, name dn, class vzFilter (.)+`), + Config: CreateAccFilterWithInValidTenantDn(rName), + ExpectError: regexp.MustCompile(`unknown property value (.)+, name dn, class vzFilter (.)+`), }, { - Config: CreateAccFilterUpdatedAttr(rName, "description", longDescAnnotation), + Config: CreateAccFilterUpdatedAttr(rName, "description", longDescAnnotation), ExpectError: regexp.MustCompile(`property descr of (.)+ failed validation for value '(.)+'`), }, { - Config: CreateAccFilterUpdatedAttr(rName, "annotation", longDescAnnotation), + Config: CreateAccFilterUpdatedAttr(rName, "annotation", longDescAnnotation), ExpectError: regexp.MustCompile(`property annotation of (.)+ failed validation for value '(.)+'`), }, { - Config: CreateAccFilterUpdatedAttr(rName, "name_alias", longNameAlias), + Config: CreateAccFilterUpdatedAttr(rName, "name_alias", longNameAlias), ExpectError: regexp.MustCompile(`property nameAlias of (.)+ failed validation for value '(.)+'`), }, { - Config: CreateAccFilterUpdatedAttr(rName, randomParameter, randomValue), + Config: CreateAccFilterUpdatedAttr(rName, randomParameter, randomValue), ExpectError: regexp.MustCompile(`An argument named (.)+ is not expected here.`), }, { - Config: CreateAccFilterConfig(rName), + Config: CreateAccFilterConfig(rName), }, }, })