Skip to content

Commit 5380f99

Browse files
author
hellertang
authored
fix vpc testcase (#926)
1 parent 76b0e9e commit 5380f99

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

tencentcloud/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var appid string = os.Getenv("TENCENTCLOUD_APPID")
1313
var ownerUin string = os.Getenv("TENCENTCLOUD_OWNER_UIN")
1414

1515
const (
16-
keepResource = "keep"
16+
keepResource = "keep"
1717
defaultResource = "Default"
1818
)
1919

tencentcloud/data_source_tc_vpc_acls_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ func TestAccDataSourceTencentCloudVpcACL_Basic(t *testing.T) {
2525

2626
const TestAccDataSourceTencentCloudVpcACLInstances = `
2727
data "tencentcloud_vpc_instances" "test" {
28+
is_default = true
2829
}
2930
3031
resource "tencentcloud_vpc_acl" "foo" {
31-
vpc_id = data.tencentcloud_vpc_instances.test.instance_list.0.vpc_id
32+
vpc_id = data.tencentcloud_vpc_instances.test.instance_list.0.vpc_id
3233
name = "test_acl"
3334
ingress = [
3435
"ACCEPT#192.168.1.0/24#80#TCP",

tencentcloud/resource_tc_vpc_acl_attachment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func testVpcAclAttachmentExists(n string) resource.TestCheckFunc {
8080

8181
const testAclAttachment_basic = `
8282
data "tencentcloud_vpc_instances" "id_instances" {
83-
name = "pulse-line-dev"
83+
is_default = true
8484
}
8585
resource "tencentcloud_vpc_acl" "foo" {
8686
vpc_id = data.tencentcloud_vpc_instances.id_instances.instance_list.0.vpc_id

tencentcloud/resource_tc_vpc_acl_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func testAccCheckVpcACLDestroy(s *terraform.State) error {
141141

142142
const testAccVpcACLConfig = `
143143
data "tencentcloud_vpc_instances" "default" {
144+
is_default = true
144145
}
145146
146147
resource "tencentcloud_vpc_acl" "foo" {
@@ -159,6 +160,7 @@ resource "tencentcloud_vpc_acl" "foo" {
159160

160161
const testAccVpcACLConfigUpdate = `
161162
data "tencentcloud_vpc_instances" "default" {
163+
is_default = true
162164
}
163165
164166
resource "tencentcloud_vpc_acl" "foo" {
@@ -177,6 +179,7 @@ resource "tencentcloud_vpc_acl" "foo" {
177179

178180
const testAccVpcACLConfigUpdateReduceAllRule = `
179181
data "tencentcloud_vpc_instances" "default" {
182+
is_default = true
180183
}
181184
182185
resource "tencentcloud_vpc_acl" "foo" {
@@ -193,6 +196,7 @@ resource "tencentcloud_vpc_acl" "foo" {
193196

194197
const testAccVpcACLConfigUpdateNoIngress = `
195198
data "tencentcloud_vpc_instances" "default" {
199+
is_default = true
196200
}
197201
198202
resource "tencentcloud_vpc_acl" "foo" {
@@ -206,6 +210,7 @@ resource "tencentcloud_vpc_acl" "foo" {
206210
`
207211
const testAccVpcACLConfigUpdateNoEgress = `
208212
data "tencentcloud_vpc_instances" "default" {
213+
is_default = true
209214
}
210215
211216
resource "tencentcloud_vpc_acl" "foo" {

tencentcloud/resource_tc_vpc_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ func TestAccTencentCloudVpcV3WithTags(t *testing.T) {
159159
resource.TestCheckResourceAttr("tencentcloud_vpc.foo", "cidr_block", defaultVpcCidr),
160160
resource.TestCheckResourceAttr("tencentcloud_vpc.foo", "name", defaultInsName),
161161
resource.TestCheckResourceAttr("tencentcloud_vpc.foo", "is_multicast", "true"),
162-
163162
resource.TestCheckResourceAttr("tencentcloud_vpc.foo", "tags.abc", "abc"),
164163
resource.TestCheckNoResourceAttr("tencentcloud_vpc.foo", "tags.test"),
165164
),

0 commit comments

Comments
 (0)