Skip to content

Commit d8dab1d

Browse files
author
hellertang
authored
fix apigw test (#959)
1 parent 95ef0fb commit d8dab1d

6 files changed

+14
-13
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "tencentcloud_api_gateway_service" "service" {
2+
service_name = "keep_apigw_service"
3+
protocol = "http&https"
4+
net_type = ["INNER", "OUTER"]
5+
ip_version = "IPv4"
6+
}

tencentcloud/resource_tc_api_gateway_api_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ const testAccAPIGatewayBase = `
140140
resource "tencentcloud_api_gateway_service" "service" {
141141
service_name = "ck"
142142
protocol = "http&https"
143-
service_desc = "your nice service"
144143
net_type = ["INNER", "OUTER"]
145144
ip_version = "IPv4"
146145
}
@@ -175,7 +174,7 @@ resource "tencentcloud_api_gateway_api" "api" {
175174
code = 100
176175
msg = "system error"
177176
desc = "system error code"
178-
converted_code = -100
177+
converted_code = 100
179178
need_convert = true
180179
}
181180
@@ -189,7 +188,6 @@ const testAccAPIGatewayAPIUpdate = `
189188
resource "tencentcloud_api_gateway_service" "service" {
190189
service_name = "ck"
191190
protocol = "http&https"
192-
service_desc = "your nice service"
193191
net_type = ["INNER", "OUTER"]
194192
ip_version = "IPv4"
195193
}
@@ -224,7 +222,7 @@ resource "tencentcloud_api_gateway_api" "api" {
224222
code = 10
225223
msg = "system error"
226224
desc = "system error code"
227-
converted_code = -10
225+
converted_code = 10
228226
need_convert = true
229227
}
230228

tencentcloud/resource_tc_api_gateway_custom_domain_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestAccTencentCloudAPIGateWayCustomDomain(t *testing.T) {
2121
Config: testAccCustomDomain,
2222
Check: resource.ComposeTestCheckFunc(
2323
testAccCheckCustomDomainExists("tencentcloud_api_gateway_custom_domain.foo"),
24-
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "service_id", "service-ohxqslqe"),
24+
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "service_id", "service-7lybgojo"),
2525
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "sub_domain", "tic-test.dnsv1.com"),
2626
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "protocol", "http"),
2727
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "net_type", "OUTER"),
@@ -34,7 +34,7 @@ func TestAccTencentCloudAPIGateWayCustomDomain(t *testing.T) {
3434
Config: testAccCustomDomainUpdate,
3535
Check: resource.ComposeTestCheckFunc(
3636
testAccCheckCustomDomainExists("tencentcloud_api_gateway_custom_domain.foo"),
37-
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "service_id", "service-ohxqslqe"),
37+
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "service_id", "service-7lybgojo"),
3838
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "sub_domain", "tic-test.dnsv1.com"),
3939
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "protocol", "http"),
4040
resource.TestCheckResourceAttr("tencentcloud_api_gateway_custom_domain.foo", "net_type", "OUTER"),
@@ -112,7 +112,7 @@ func testAccCheckCustomDomainExists(n string) resource.TestCheckFunc {
112112

113113
const testAccCustomDomain = `
114114
resource "tencentcloud_api_gateway_custom_domain" "foo" {
115-
service_id = "service-ohxqslqe"
115+
service_id = "service-7lybgojo"
116116
sub_domain = "tic-test.dnsv1.com"
117117
protocol = "http"
118118
net_type = "OUTER"
@@ -124,7 +124,7 @@ resource "tencentcloud_api_gateway_custom_domain" "foo" {
124124

125125
const testAccCustomDomainUpdate = `
126126
resource "tencentcloud_api_gateway_custom_domain" "foo" {
127-
service_id = "service-ohxqslqe"
127+
service_id = "service-7lybgojo"
128128
sub_domain = "tic-test.dnsv1.com"
129129
protocol = "http"
130130
net_type = "OUTER"

tencentcloud/resource_tc_api_gateway_ip_strategy_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ const testAPIGatewayServiceBase = `
109109
resource "tencentcloud_api_gateway_service" "service" {
110110
service_name = "niceservice"
111111
protocol = "http&https"
112-
service_desc = "your nice service"
113112
net_type = ["INNER", "OUTER"]
114113
ip_version = "IPv4"
115114
}

tencentcloud/resource_tc_api_gateway_strategy_attachment_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ const testAPIGatewayServiceAttachmentBase = `
101101
resource "tencentcloud_api_gateway_service" "service" {
102102
service_name = "niceservice"
103103
protocol = "http&https"
104-
service_desc = "your nice service"
105104
net_type = ["INNER", "OUTER"]
106105
ip_version = "IPv4"
107106
}
@@ -142,7 +141,7 @@ resource "tencentcloud_api_gateway_api" "api" {
142141
code = 20
143142
msg = "system error"
144143
desc = "system error code"
145-
converted_code = -10
144+
converted_code = 10
146145
need_convert = true
147146
}
148147
}

tencentcloud/resource_tc_api_gateway_usage_plan_attachment_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ resource "tencentcloud_api_gateway_usage_plan" "plan" {
194194
resource "tencentcloud_api_gateway_service" "service" {
195195
service_name = "niceservice"
196196
protocol = "http&https"
197-
service_desc = "your nice service"
198197
net_type = ["INNER", "OUTER"]
199198
ip_version = "IPv4"
200199
}
@@ -228,7 +227,7 @@ resource "tencentcloud_api_gateway_api" "api" {
228227
code = 10
229228
msg = "system error"
230229
desc = "system error code"
231-
converted_code = -10
230+
converted_code = 10
232231
need_convert = true
233232
}
234233
}

0 commit comments

Comments
 (0)