Skip to content

Commit 7c4226e

Browse files
adrianriobopraveenkumar
authored andcommitted
[e2e] fix ssh cmd on e2e container
this is a following PR for [#3347](#3347) where ssh command tried to emulate a local session with su, that approach is working fine on darwin platform but is not working for linux. This PR will use that approach only for darwin and leave windows and linux as they were before the PR #3347
1 parent ec0a262 commit 7c4226e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

images/build-e2e/entrypoint.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ fi
108108
if [ "${CLEANUP_HOME}" = "false" ]; then
109109
OPTIONS+="--cleanup-home=false "
110110
fi
111-
if [ -n "${INSTALLER_PATH}" ]; then
112-
OPTIONS+="--installer-path=${INSTALLER_PATH} "
113-
fi
114-
if [ -n "${USER_PASSWORD}" ]; then
115-
OPTIONS+="--user-password=${USER_PASSWORD} "
111+
112+
TAGS="@${PLATFORM}"
113+
if [ -n "${E2E_TAG_EXPRESSION}" ]; then
114+
TAGS+=" && ${E2E_TAG_EXPRESSION}"
116115
fi
117-
OPTIONS+="--godog.tags=\"@${PLATFORM} && ${E2E_TAG_EXPRESSION}\" --godog.format=junit "
118-
if [[ ${PLATFORM} == 'windows' ]]; then
119-
BINARY_EXEC+="cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results"
116+
if [[ ${PLATFORM} == 'darwin' ]]; then
117+
OPTIONS+="--godog.tags=\\\"${TAGS}\\\" --godog.format=junit "
118+
BINARY_EXEC+="sudo su - ${TARGET_HOST_USERNAME} -c \"PATH=\$PATH:/usr/local/bin && cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results\""
120119
else
121-
BINARY_EXEC+="sudo su - ${TARGET_HOST_USERNAME} -c \"cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results\""
120+
OPTIONS+="--godog.tags=\"${TAGS}\" --godog.format=junit "
121+
BINARY_EXEC+="cd ${EXECUTION_FOLDER}/bin && ./${BINARY} ${OPTIONS} > ${RESULTS_FILE}.results"
122122
fi
123123
# Execute command remote
124124
$SSH ${REMOTE} ${BINARY_EXEC}

0 commit comments

Comments
 (0)