File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -361,13 +361,13 @@ function useChildAccountCredentials {
361361 fi
362362 session_id=$(( 1 + $RANDOM % 10000 ))
363363 if [[ -z " $pick_acct " || -z " $session_id " ]]; then
364- echo " Unable to find a child account. Falling back to parent AWS account "
365- return
364+ echo " Unable to find a child account. Fatal error and test run aborted "
365+ exit 1
366366 fi
367367 creds=$( aws sts assume-role --role-arn arn:aws:iam::${pick_acct} :role/OrganizationAccountAccessRole --role-session-name testSession${session_id} --duration-seconds 3600)
368368 if [ -z $( echo $creds | jq -c -r ' .AssumedRoleUser.Arn' ) ]; then
369- echo " Unable to assume child account role. Falling back to parent AWS account "
370- return
369+ echo " Unable to assume child account role. Fatal error and test run aborted "
370+ exit 1
371371 fi
372372 export ORGANIZATION_SIZE=$org_size
373373 export CREDS=$creds
You can’t perform that action at this time.
0 commit comments