Skip to content

Commit 793cfd0

Browse files
Fixed broken integration test (#805)
1 parent 8adaf99 commit 793cfd0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integration/lke/test_clusters.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,14 @@ def test_cluster_dashboard_url(lke_cluster):
140140
def test_node_pool_list(lke_cluster):
141141
cluster_id = lke_cluster
142142
res = exec_test_command(
143-
BASE_CMDS["lke"] + ["pools-list", cluster_id, "--text", "--delimiter=,"]
143+
BASE_CMDS["lke"] + ["pools-list", cluster_id, "--json"]
144144
)
145-
lines = res.splitlines()
145+
data = json.loads(res)
146146

147-
headers = ["nodes.id", "nodes.instance_id"]
148-
assert_headers_in_lines(headers, lines)
147+
for pool in data:
148+
for node in pool.get("nodes", []):
149+
assert "id" in node
150+
assert "instance_id" in node
149151

150152

151153
def test_view_pool(lke_cluster):

0 commit comments

Comments
 (0)