diff --git a/entrypoint.sh b/entrypoint.sh index 8c3f793..713b080 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -19,7 +19,7 @@ else fi # Check optimade-python-tools version is >0.10 -PACKAGE_VERSION=($(python helper.py package-version)) +PACKAGE_VERSION=($(python /helper.py package-version)) if [ ${PACKAGE_VERSION[0]} -eq 0 ] && [ ${PACKAGE_VERSION[1]} -lt 10 ]; then echo "Incompatible validator version requested ${INPUT_VALIDATOR_VERSION}, please use >=0.10." @@ -124,7 +124,7 @@ if [ "${INPUT_PATH}" = "/" ]; then else filler="/v" fi -API_VERSION=($(python helper.py api-versions)) +API_VERSION=($(python /helper.py api-versions)) case ${INPUT_ALL_VERSIONED_PATHS} in y | Y | yes | Yes | YES | true | True | TRUE | on | On | ON) for version in "${API_VERSION[@]}"; do @@ -157,7 +157,7 @@ esac EXIT_CODE=${PIPESTATUS[0]} # Create output 'results' -RESULTS=$(python helper.py results) +RESULTS=$(python /helper.py results) echo "::set-output name=results::${RESULTS}" exit ${EXIT_CODE} diff --git a/tests/test_fixtures.bash b/tests/test_fixtures.bash index e22fb31..3ccf51e 100644 --- a/tests/test_fixtures.bash +++ b/tests/test_fixtures.bash @@ -34,11 +34,15 @@ function setup_file() { rm -f ${DOCKER_BATS_WORKDIR}/tests/.entrypoint-run_validator.txt rm -f ${ENTRYPOINT_SH} - # Comment out "set -e" from entrypoint.sh in a new test entrypoint.sh + # Create BATS test entrypoint.sh at ${ENTRYPOINT_SH} while IFS="" read -r line || [ -n "${line}" ]; do if [[ "${line}" =~ ^set[[:blank:]]-e$ ]]; then + # Comment out "set -e" from entrypoint.sh in a new test entrypoint.sh line="# ${line}" fi + if [[ "${line}" =~ ^.*helper\.py.*$ ]]; then + line="${line/\/helper\.py/helper.py}" + fi printf "%s\n" "${line}" >> ${ENTRYPOINT_SH} done < ${REAL_ENTRYPOINT_SH} chmod +x ${ENTRYPOINT_SH}