Skip to content

Commit af32eae

Browse files
Fixed issue in get_pool_nodesid helper improperly accessing data
1 parent 793cfd0 commit af32eae

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/integration/lke/helpers.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,20 @@ def get_node_pool_id(cluster_id):
4545

4646

4747
def get_pool_nodesid(cluster_id):
48-
cluster_id
49-
nodepool_id = exec_test_command(
48+
response = exec_test_command(
5049
BASE_CMDS["lke"]
5150
+ [
5251
"pools-list",
5352
cluster_id,
54-
"--text",
55-
"--no-headers",
56-
"--format",
57-
"nodes.id",
53+
"--json",
5854
]
59-
).splitlines()
55+
)
6056

61-
first_id = nodepool_id[0]
57+
nodepools = json.loads(response)
6258

63-
return first_id
59+
first_node_id = nodepools[0]["nodes"][0]["id"]
60+
61+
return first_node_id
6462

6563

6664
def get_lke_enterprise_id():

0 commit comments

Comments
 (0)