Skip to content

Commit 86d3880

Browse files
authored
fix testcasess (#1076)
1 parent fdb5ccf commit 86d3880

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

tencentcloud/data_source_tc_vpn_gateway_routes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestAccTencentCloudVpnGatewayRoutesDataSource(t *testing.T) {
3232
const testAccTencentCloudVpnGatewayRoutesDataSourceConfig_basic = defaultVpnDataSource + `
3333
resource "tencentcloud_vpn_gateway_route" "route1" {
3434
vpn_gateway_id = data.tencentcloud_vpn_gateways.foo.gateway_list.0.id
35-
destination_cidr_block = "10.0.0.0/16"
35+
destination_cidr_block = "10.0.0.0/18"
3636
instance_type = "VPNCONN"
3737
instance_id = data.tencentcloud_vpn_connections.conns.connection_list.0.id
3838
priority = "100"

tencentcloud/resource_tc_dc_gateway.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"context"
3232
"fmt"
3333
"strings"
34+
"time"
3435

3536
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
3637
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
@@ -138,6 +139,9 @@ func resourceTencentCloudDcGatewayCreate(d *schema.ResourceData, meta interface{
138139

139140
d.SetId(dcgId)
140141

142+
// add sleep protect, either network_instance_id will be set "".
143+
time.Sleep(1)
144+
141145
return resourceTencentCloudDcGatewayRead(d, meta)
142146
}
143147

tencentcloud/resource_tc_dc_gateway_ccn_route.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"context"
3535
"fmt"
3636
"strings"
37+
"time"
3738

3839
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
3940
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
@@ -94,6 +95,9 @@ func resourceTencentCloudDcGatewayCcnRouteCreate(d *schema.ResourceData, meta in
9495

9596
d.SetId(dcgId + "#" + routeId)
9697

98+
// add sleep protect, either network_instance_id will be set "".
99+
time.Sleep(1)
100+
97101
return resourceTencentCloudDcGatewayCcnRouteRead(d, meta)
98102
}
99103

0 commit comments

Comments
 (0)