Skip to content

Commit 76b8d99

Browse files
authored
fix tke endpoint and node pool e2e case (#1384)
1 parent 28f4a05 commit 76b8d99

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tencentcloud/resource_tc_kubernetes_cluster_endpoint_test.go

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

6565
const testAccTkeClusterEndpointNewSG = `
66-
resource "tencentcloud_security_group" "new_sg" {
67-
name = "test-endpoint"
66+
data "tencentcloud_security_groups" "new_sg" {
67+
name = "keep-tke-ep-sg-fwf8zdkx"
6868
}
6969
7070
locals {
71-
new_sg = tencentcloud_security_group.new_sg.id
71+
new_sg = data.tencentcloud_security_groups.new_sg.security_groups.0.security_group_id
7272
}
7373
7474
`

tencentcloud/resource_tc_kubernetes_node_pool_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func TestAccTencentCloudTkeNodePoolResourceBasic(t *testing.T) {
9494
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "desired_capacity", "1"),
9595
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "name", "mynodepool"),
9696
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "unschedulable", "0"),
97-
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "scaling_group_name", "basic_group"),
97+
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "scaling_group_name", "asg_np_test"),
9898
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "default_cooldown", "400"),
9999
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "termination_policies.#", "1"),
100100
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "termination_policies.0", "OLDEST_INSTANCE"),
@@ -129,7 +129,7 @@ func TestAccTencentCloudTkeNodePoolResourceBasic(t *testing.T) {
129129
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "name", "mynodepoolupdate"),
130130
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "node_os", defaultTkeOSImageName),
131131
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "unschedulable", "0"),
132-
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "scaling_group_name", "basic_group_test"),
132+
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "scaling_group_name", "asg_np_test_changed"),
133133
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "default_cooldown", "350"),
134134
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "termination_policies.#", "1"),
135135
resource.TestCheckResourceAttr(testTkeClusterNodePoolResourceKey, "termination_policies.0", "NEWEST_INSTANCE"),
@@ -264,7 +264,7 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
264264
retry_policy = "INCREMENTAL_INTERVALS"
265265
desired_capacity = 1
266266
enable_auto_scale = true
267-
scaling_group_name = "basic_group"
267+
scaling_group_name = "asg_np_test"
268268
default_cooldown = 400
269269
termination_policies = ["OLDEST_INSTANCE"]
270270
scaling_group_project_id = var.default_project
@@ -329,7 +329,7 @@ resource "tencentcloud_kubernetes_node_pool" "np_test" {
329329
node_os = var.default_img
330330
scaling_group_project_id = var.default_project
331331
delete_keep_instance = false
332-
scaling_group_name = "basic_group_test"
332+
scaling_group_name = "asg_np_test_changed"
333333
default_cooldown = 350
334334
termination_policies = ["NEWEST_INSTANCE"]
335335
multi_zone_subnet_policy = "EQUALITY"

0 commit comments

Comments
 (0)