diff --git a/.drone.yml b/.drone.yml index b768fd3f1e..60194f482c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -481,14 +481,14 @@ pipeline: acceptance-access-levels: image: nextcloudci/php7.0:php7.0-7 commands: - - build/acceptance/run-local.sh features/access-levels.feature + - build/acceptance/run-local.sh allow-git-repository-modifications features/access-levels.feature when: matrix: TESTS-ACCEPTANCE: access-levels acceptance-login: image: nextcloudci/php7.0:php7.0-7 commands: - - build/acceptance/run-local.sh features/login.feature + - build/acceptance/run-local.sh allow-git-repository-modifications features/login.feature when: matrix: TESTS-ACCEPTANCE: login diff --git a/build/acceptance/run-local.sh b/build/acceptance/run-local.sh index a235871624..bd5d6b09be 100755 --- a/build/acceptance/run-local.sh +++ b/build/acceptance/run-local.sh @@ -39,7 +39,15 @@ set -o errexit # Behat through Composer or running Behat) expect that. cd "$(dirname $0)" -SCENARIO_TO_RUN=$1 +# Safety parameter to prevent executing this script by mistake and messing with +# the Git repository. +if [ "$1" != "allow-git-repository-modifications" ]; then + echo "To run the acceptance tests use \"run.sh\" instead" + + exit 1 +fi + +SCENARIO_TO_RUN=$2 composer install diff --git a/build/acceptance/run.sh b/build/acceptance/run.sh index 7a394883d8..2a6efde74f 100755 --- a/build/acceptance/run.sh +++ b/build/acceptance/run.sh @@ -174,4 +174,4 @@ prepareSelenium prepareDocker echo "Running tests" -docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && build/acceptance/run-local.sh $SCENARIO_TO_RUN" +docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && build/acceptance/run-local.sh allow-git-repository-modifications $SCENARIO_TO_RUN"