Skip to content

Commit

Permalink
fix: LKE integration test with node pool (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
yec-akamai authored Jan 6, 2025
1 parent d7a4452 commit d7cf6dc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/integration/lke/test_clusters.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json

import pytest

from tests.integration.helpers import (
Expand Down Expand Up @@ -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(
Expand All @@ -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",
Expand All @@ -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):
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit d7cf6dc

Please sign in to comment.