test: include failed hooks in expectd failures (#11764)

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Co-authored-by: Kavita Gautam <kavita@jankaritech.com>
This commit is contained in:
Sawjan Gurung
2025-10-28 13:02:59 +05:45
committed by GitHub
parent ac731ab642
commit e5a2c8e6e5
2 changed files with 14 additions and 0 deletions

View File

@@ -312,6 +312,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
#### [Delete user containing + in username returns 404 but user gets deleted](https://github.com/owncloud/ocis/issues/11027)
- [apiGraphUser/deleteUser.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/deleteUser.feature#L25)
- [apiGraphUser/createUser.feature:106](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/createUser.feature#L106)
#### [OCM. delete-accepted-user endpoint always returns 200](https://github.com/owncloud/ocis/issues/10223)

View File

@@ -271,6 +271,19 @@ function run_behat_tests() {
# then the awk, grep, sed command sequence above ends up with an empty string.
# Unset FAILED_SCENARIO_PATHS to avoid later code thinking that there might be
# one failed scenario.
# get the failed hooks
FAILED_HOOK_PATHS=`awk '/Failed hooks:/',0 ${TEST_LOG_FILE} | grep --color=never -oP '(?<=").*\.feature:[0-9]+(?=")'`
# check if any of the failed hooks are not already in the failed scenarios
for HOOK_PATH in ${FAILED_HOOK_PATHS}
do
echo "${FAILED_SCENARIO_PATHS}" | grep -q "${HOOK_PATH}"
if [ $? -ne 0 ]
then
FAILED_SCENARIO_PATHS=`echo -e "${FAILED_SCENARIO_PATHS}\n ${HOOK_PATH}"`
fi
done
if [ -z "${FAILED_SCENARIO_PATHS}" ]
then
unset FAILED_SCENARIO_PATHS