Skip to content

Commit 2cfc975

Browse files
committed
1.adjust tcr sweeper. 2.rm duplicated tke e2e case code
1 parent 1bb43e2 commit 2cfc975

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

tencentcloud/resource_tc_kubernetes_cluster_endpoint_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ func TestAccTencentCloudKubernetesClusterEndpointResource(t *testing.T) {
6363
})
6464
}
6565

66-
const testAccTkeClusterEndpointNewSG = `
67-
data "tencentcloud_security_groups" "new_sg" {
68-
name = "keep-tke-ep-sg-fwf8zdkx"
69-
}
66+
// const testAccTkeClusterEndpointNewSG = `
67+
// data "tencentcloud_security_groups" "new_sg" {
68+
// name = "keep-tke-ep-sg-fwf8zdkx"
69+
// }
7070

71-
locals {
72-
new_sg = data.tencentcloud_security_groups.new_sg.security_groups.0.security_group_id
73-
}
71+
// locals {
72+
// new_sg = data.tencentcloud_security_groups.new_sg.security_groups.0.security_group_id
73+
// }
7474

75-
`
75+
// `
7676

7777
const testAccTkeClusterEndpointBasicDeps = TkeCIDRs +
7878
TkeDataSource +
7979
TkeDefaultNodeInstanceVar +
8080
defaultImages +
8181
defaultSecurityGroupData +
82-
testAccTkeClusterEndpointNewSG + `
82+
`
8383
variable "availability_zone" {
8484
default = "ap-guangzhou-3"
8585
}
@@ -173,7 +173,7 @@ resource "tencentcloud_kubernetes_cluster_endpoint" "foo" {
173173
cluster_id = local.new_cluster_id
174174
cluster_internet = true
175175
cluster_intranet = true
176-
cluster_internet_security_group = local.new_sg
176+
cluster_internet_security_group = local.sg_id2
177177
cluster_intranet_subnet_id = data.tencentcloud_vpc_subnets.sub.instance_list.0.subnet_id
178178
extensive_parameters = jsonencode({
179179
InternetAccessible = {
@@ -192,7 +192,7 @@ resource "tencentcloud_kubernetes_cluster_endpoint" "foo" {
192192
cluster_id = local.new_cluster_id
193193
cluster_internet = false
194194
cluster_intranet = true
195-
cluster_internet_security_group = local.new_sg
195+
cluster_internet_security_group = local.sg_id2
196196
cluster_intranet_subnet_id = data.tencentcloud_vpc_subnets.sub.instance_list.0.subnet_id
197197
depends_on = [
198198
tencentcloud_kubernetes_node_pool.np_test

tencentcloud/resource_tc_tcr_customized_domain_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func testSweepTcrCustomizedDomain(r string) error {
2828
return err
2929
}
3030
if domains == nil {
31-
return fmt.Errorf("tcr customize domain instance not exists.")
31+
return nil
3232
}
3333

3434
for _, v := range domains {

tencentcloud/resource_tc_tcr_namespace_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func init() {
3737
}
3838

3939
if len(instances) == 0 {
40-
return fmt.Errorf("instance %s not exist", defaultTCRInstanceName)
40+
return nil
4141
}
4242

4343
instanceId := *instances[0].RegistryId

tencentcloud/resource_tc_tcr_repository_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func testSweepTCRRepository(r string) error {
3838
}
3939

4040
if len(instances) == 0 {
41-
return fmt.Errorf("instance %s not exist", defaultTCRInstanceName)
41+
return nil
4242
}
4343

4444
instanceId := *instances[0].RegistryId

tencentcloud/resource_tc_tcr_token_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func init() {
3939
}
4040

4141
if len(instances) == 0 {
42-
return fmt.Errorf("instance %s not exist", defaultTCRInstanceName)
42+
return nil
4343
}
4444

4545
instanceId := *instances[0].RegistryId

0 commit comments

Comments
 (0)