Skip to content

Commit

Permalink
e2e: emulate user local session when running e2e binary
Browse files Browse the repository at this point in the history
Initially this was introduced as a solution for a security constraint we are hitting on AWS mac m1 where a remote session has llimited privileges (even when user is sudoer). But the unexpected outcome as I explained; changing the session to a local session ends up being more accurate to real user case. So it seems more a improvement than a workaround.
  • Loading branch information
adrianriobo authored and praveenkumar committed Sep 19, 2022
1 parent 0d76300 commit a6b9b38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion images/build-e2e/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ if [ -n "${USER_PASSWORD}" ]; then
OPTIONS+="--user-password=${USER_PASSWORD} "
fi
OPTIONS+="--godog.tags=\"@${PLATFORM} && ${E2E_TAG_EXPRESSION}\" --godog.format=junit "
BINARY_EXEC+="cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results"
if [[ ${PLATFORM} == 'windows' ]]; then
BINARY_EXEC+="cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results"
else
BINARY_EXEC+="sudo su - ${TARGET_HOST_USERNAME} -c \"cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results\""
fi
# Execute command remote
$SSH ${REMOTE} ${BINARY_EXEC}

Expand Down

0 comments on commit a6b9b38

Please sign in to comment.