From 096dc929d9e1e19830ff04a904f004d2963707b4 Mon Sep 17 00:00:00 2001 From: JesusAlvarezTorres Date: Fri, 25 Sep 2020 17:26:45 -0700 Subject: [PATCH 1/2] test: E2E fix scale test indexing out of bounds --- test/e2e/cluster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/cluster.sh b/test/e2e/cluster.sh index 3c48afd991..ef465965dc 100755 --- a/test/e2e/cluster.sh +++ b/test/e2e/cluster.sh @@ -329,7 +329,7 @@ fi if [ "${SCALE_CLUSTER}" = "true" ]; then nodepools=$(jq -r '.properties.agentPoolProfiles[].name' < _output/$RESOURCE_GROUP/apimodel.json) - for ((i = 0; i <= ${#nodepools[@]}; ++i)); do + for ((i = 0; i < ${#nodepools[@]}; ++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 From fd871d940c968b68ce41d133588f187e0ef3cdf6 Mon Sep 17 00:00:00 2001 From: JesusAlvarezTorres Date: Mon, 28 Sep 2020 12:21:17 -0700 Subject: [PATCH 2/2] fix: fix indexing of node pools for scale tests --- test/e2e/cluster.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/cluster.sh b/test/e2e/cluster.sh index ef465965dc..c41ef8d4a5 100755 --- a/test/e2e/cluster.sh +++ b/test/e2e/cluster.sh @@ -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