Skip to content

Commit

Permalink
test: E2E fix scale test indexing out of bounds (Azure#3873)
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusAlvarezTorres authored and penggu committed Oct 28, 2020
1 parent 14f075f commit 8037633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ if [ -n "$ADD_NODE_POOL_INPUT" ]; then
fi

if [ "${SCALE_CLUSTER}" = "true" ]; then
nodepools=$(jq -r '.properties.agentPoolProfiles[].name' < _output/$RESOURCE_GROUP/apimodel.json)
for ((i = 0; i <= ${#nodepools[@]}; ++i)); do
nodepoolcount=$(jq '.properties.agentPoolProfiles| length' < _output/$RESOURCE_GROUP/apimodel.json)
for ((i = 0; i < $nodepoolcount; ++i)); do
nodepool=$(jq -r --arg i $i '. | .properties.agentPoolProfiles[$i | tonumber].name' < _output/$RESOURCE_GROUP/apimodel.json)
if [ "${UPDATE_NODE_POOLS}" = "true" ]; then
# modify the master VM SKU to simulate vertical vm scaling via upgrade
Expand Down

0 comments on commit 8037633

Please sign in to comment.