diff --git a/tests/integration/lke/test_clusters.py b/tests/integration/lke/test_clusters.py index 7919e9be3..895b05d24 100644 --- a/tests/integration/lke/test_clusters.py +++ b/tests/integration/lke/test_clusters.py @@ -1,3 +1,5 @@ +import json + import pytest from tests.integration.helpers import ( @@ -319,14 +321,14 @@ def test_view_pool(test_lke_cluster): ) lines = res.splitlines() - headers = ["type", "labels.value"] + headers = ["type", "labels"] assert_headers_in_lines(headers, lines) def test_update_node_pool(test_lke_cluster): cluster_id = test_lke_cluster node_pool_id = get_node_pool_id(cluster_id) - new_label = get_random_text(8) + "updated_pool" + new_value = get_random_text(8) + "updated_pool" result = ( exec_test_command( @@ -337,8 +339,8 @@ def test_update_node_pool(test_lke_cluster): node_pool_id, "--count", "5", - "--labels.value", - new_label, + "--labels", + json.dumps({"label-key": new_value}), "--text", "--no-headers", "--format=label", @@ -348,7 +350,7 @@ def test_update_node_pool(test_lke_cluster): .rstrip() ) - assert new_label in result + assert new_value in result def test_view_node(test_lke_cluster): @@ -445,6 +447,8 @@ def test_node_pool(test_lke_cluster): "1", "--type", "g6-standard-4", + "--labels", + '{ "example.com/my-app":"team1" }', "--text", "--format=id", "--no-headers", @@ -488,8 +492,7 @@ def test_update_autoscaler(test_lke_cluster, test_node_pool): "count", "disk_encryption", "id", - "labels.key", - "labels.value", + "labels", "tags", "taints", "type",