Skip to content

Commit e5a2c8e

Browse files
saw-janKavita Gautam
andauthored
test: include failed hooks in expectd failures (#11764)
Signed-off-by: Saw-jan <[email protected]> Co-authored-by: Kavita Gautam <[email protected]>
1 parent ac731ab commit e5a2c8e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
312312
#### [Delete user containing + in username returns 404 but user gets deleted](https://github.com/owncloud/ocis/issues/11027)
313313

314314
- [apiGraphUser/deleteUser.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/deleteUser.feature#L25)
315+
- [apiGraphUser/createUser.feature:106](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/createUser.feature#L106)
315316

316317
#### [OCM. delete-accepted-user endpoint always returns 200](https://github.com/owncloud/ocis/issues/10223)
317318

tests/acceptance/run.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,19 @@ function run_behat_tests() {
271271
# then the awk, grep, sed command sequence above ends up with an empty string.
272272
# Unset FAILED_SCENARIO_PATHS to avoid later code thinking that there might be
273273
# one failed scenario.
274+
275+
# get the failed hooks
276+
FAILED_HOOK_PATHS=`awk '/Failed hooks:/',0 ${TEST_LOG_FILE} | grep --color=never -oP '(?<=").*\.feature:[0-9]+(?=")'`
277+
# check if any of the failed hooks are not already in the failed scenarios
278+
for HOOK_PATH in ${FAILED_HOOK_PATHS}
279+
do
280+
echo "${FAILED_SCENARIO_PATHS}" | grep -q "${HOOK_PATH}"
281+
if [ $? -ne 0 ]
282+
then
283+
FAILED_SCENARIO_PATHS=`echo -e "${FAILED_SCENARIO_PATHS}\n ${HOOK_PATH}"`
284+
fi
285+
done
286+
274287
if [ -z "${FAILED_SCENARIO_PATHS}" ]
275288
then
276289
unset FAILED_SCENARIO_PATHS

0 commit comments

Comments
 (0)