Make sure actions/lib directory is in PYTHONPATH for st2-run-pack-tests
script.
@@ -157,6 +157,7 @@ PACK_TESTS_PATH="${PACK_PATH}/tests/"
SENSORS_PATH="${PACK_PATH}/sensors/"
ACTIONS_PATH="${PACK_PATH}/actions/"
+ACTIONS_LIB_PATH="${PACK_PATH}/actions/lib/"
ETC_PATH="${PACK_PATH}/etc/"
# Bail early if no tests are found, this way we don't need to wait for
@@ -217,12 +218,12 @@ if [ ${ST2_REPO_PATH} ]; then
ST2_REPO_PATH=${ST2_REPO_PATH:-/tmp/st2}
ST2_COMPONENTS=$(find ${ST2_REPO_PATH}/* -maxdepth 0 -name "st2*" -type d)
ST2_RUNNERS=$(find ${ST2_REPO_PATH}/contrib/runners/* -maxdepth 0 -type d 2> /dev/null)
- PACK_PYTHONPATH="$(join ":" ${ST2_COMPONENTS}):$(join ":" ${ST2_RUNNERS}):${SENSORS_PATH}:${ACTIONS_PATH}:${ETC_PATH}"
+ PACK_PYTHONPATH="$(join ":" ${ST2_COMPONENTS}):$(join ":" ${ST2_RUNNERS}):${SENSORS_PATH}:${ACTIONS_PATH}:${ACTIONS_LIB_PATH}:${ETC_PATH}"
else
# ST2_REPO_PATH not provided, assume all the st2 component packages are
# already in PYTHONPATH
ST2_RUNNERS=$(find /opt/stackstorm/runners/* -maxdepth 0 -type d 2> /dev/null)
- PACK_PYTHONPATH="$(join ":" ${ST2_COMPONENTS}):$(join ":" ${ST2_RUNNERS}):${SENSORS_PATH}:${ACTIONS_PATH}:${ETC_PATH}"
+ PACK_PYTHONPATH="$(join ":" ${ST2_COMPONENTS}):$(join ":" ${ST2_RUNNERS}):${SENSORS_PATH}:${ACTIONS_PATH}:${ACTIONS_LIB_PATH}:${ETC_PATH}"
fi
if [ "${JUST_TESTS}" = false ]; then
