Skip to content

Commit d7cf6dc

Browse files
authored
fix: LKE integration test with node pool (#715)
1 parent d7a4452 commit d7cf6dc

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tests/integration/lke/test_clusters.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import json
2+
13
import pytest
24

35
from tests.integration.helpers import (
@@ -319,14 +321,14 @@ def test_view_pool(test_lke_cluster):
319321
)
320322

321323
lines = res.splitlines()
322-
headers = ["type", "labels.value"]
324+
headers = ["type", "labels"]
323325
assert_headers_in_lines(headers, lines)
324326

325327

326328
def test_update_node_pool(test_lke_cluster):
327329
cluster_id = test_lke_cluster
328330
node_pool_id = get_node_pool_id(cluster_id)
329-
new_label = get_random_text(8) + "updated_pool"
331+
new_value = get_random_text(8) + "updated_pool"
330332

331333
result = (
332334
exec_test_command(
@@ -337,8 +339,8 @@ def test_update_node_pool(test_lke_cluster):
337339
node_pool_id,
338340
"--count",
339341
"5",
340-
"--labels.value",
341-
new_label,
342+
"--labels",
343+
json.dumps({"label-key": new_value}),
342344
"--text",
343345
"--no-headers",
344346
"--format=label",
@@ -348,7 +350,7 @@ def test_update_node_pool(test_lke_cluster):
348350
.rstrip()
349351
)
350352

351-
assert new_label in result
353+
assert new_value in result
352354

353355

354356
def test_view_node(test_lke_cluster):
@@ -445,6 +447,8 @@ def test_node_pool(test_lke_cluster):
445447
"1",
446448
"--type",
447449
"g6-standard-4",
450+
"--labels",
451+
'{ "example.com/my-app":"team1" }',
448452
"--text",
449453
"--format=id",
450454
"--no-headers",
@@ -488,8 +492,7 @@ def test_update_autoscaler(test_lke_cluster, test_node_pool):
488492
"count",
489493
"disk_encryption",
490494
"id",
491-
"labels.key",
492-
"labels.value",
495+
"labels",
493496
"tags",
494497
"taints",
495498
"type",

0 commit comments

Comments
 (0)