Skip to content

Commit

Permalink
fix(apig/throttle): avoid the duplicate resource name (#5134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance52259 authored Jul 5, 2024
1 parent fa1f687 commit 23c8967
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestAccThrottlingPolicy_basic(t *testing.T) {
Config: testAccApigThrottlingPolicy_basic_step4(baseConfig, name),
Check: resource.ComposeTestCheckFunc(
rcPre.CheckResourceExists(),
resource.TestCheckResourceAttr(rNamePre, "name", name),
resource.TestCheckResourceAttr(rNamePre, "name", name+"_pre_test"),
resource.TestCheckResourceAttr(rNamePre, "description", "Created by script"),
resource.TestCheckResourceAttr(rNamePre, "type", "API-based"),
resource.TestCheckResourceAttr(rNamePre, "period", "15000"),
Expand Down Expand Up @@ -188,7 +188,7 @@ func testAccApigThrottlingPolicy_basic_step1(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "invalid_type" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_invalid_type"
type = "NON-Exist-Type"
period = 15000
period_unit = "SECOND"
Expand All @@ -205,7 +205,7 @@ func testAccApigThrottlingPolicy_basic_step2(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "invalid_app_id" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_invalid_app_id"
type = "API-based"
period = 15000
period_unit = "SECOND"
Expand All @@ -225,7 +225,7 @@ func testAccApigThrottlingPolicy_basic_step3(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "invalid_user_id" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_invalid_user_id"
type = "API-based"
period = 15000
period_unit = "SECOND"
Expand All @@ -245,7 +245,7 @@ func testAccApigThrottlingPolicy_basic_step4(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "pre_test" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_pre_test"
type = "API-based"
period = 15000
period_unit = "SECOND"
Expand All @@ -264,7 +264,7 @@ func testAccApigThrottlingPolicy_basic_step5(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "pre_test" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_pre_test"
type = "NON-Exist-Type"
period = 15000
period_unit = "SECOND"
Expand All @@ -285,7 +285,7 @@ func testAccApigThrottlingPolicy_basic_step6(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "pre_test" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_pre_test"
type = "API-based"
period = 15000
period_unit = "SECOND"
Expand All @@ -309,7 +309,7 @@ func testAccApigThrottlingPolicy_basic_step7(baseConfig, name string) string {
resource "huaweicloud_apig_throttling_policy" "pre_test" {
instance_id = local.instance_id
name = "%[2]s"
name = "%[2]s_pre_test"
type = "API-based"
period = 15000
period_unit = "SECOND"
Expand Down

0 comments on commit 23c8967

Please sign in to comment.