From 2f80025ec25dd3ce19c0664f07073399e9bf99e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 21 Apr 2017 14:35:19 +0200 Subject: [PATCH] Move acceptance tests from build/acceptance to tests/acceptance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- .drone.yml | 4 ++-- {build => tests}/acceptance/composer.json | 0 {build => tests}/acceptance/config/behat.yml | 0 {build => tests}/acceptance/features/access-levels.feature | 0 .../acceptance/features/bootstrap/FeatureContext.php | 0 .../acceptance/features/bootstrap/FilesAppContext.php | 0 .../acceptance/features/bootstrap/LoginPageContext.php | 0 .../acceptance/features/bootstrap/NotificationContext.php | 0 .../acceptance/features/bootstrap/SettingsMenuContext.php | 0 .../acceptance/features/bootstrap/UsersSettingsContext.php | 0 {build => tests}/acceptance/features/core/Actor.php | 0 {build => tests}/acceptance/features/core/ActorAware.php | 0 .../acceptance/features/core/ActorAwareInterface.php | 0 {build => tests}/acceptance/features/core/ActorContext.php | 0 {build => tests}/acceptance/features/core/Locator.php | 0 .../acceptance/features/core/NextcloudTestServerContext.php | 0 .../acceptance/features/core/NextcloudTestServerHelper.php | 0 .../features/core/NextcloudTestServerLocalHelper.php | 0 .../acceptance/features/core/NoSuchElementException.php | 0 {build => tests}/acceptance/features/core/Utils.php | 0 {build => tests}/acceptance/features/login.feature | 0 {build => tests}/acceptance/installAndConfigureServer.sh | 0 {build => tests}/acceptance/run-local.sh | 4 ++-- {build => tests}/acceptance/run.sh | 5 +++-- 24 files changed, 7 insertions(+), 6 deletions(-) rename {build => tests}/acceptance/composer.json (100%) rename {build => tests}/acceptance/config/behat.yml (100%) rename {build => tests}/acceptance/features/access-levels.feature (100%) rename {build => tests}/acceptance/features/bootstrap/FeatureContext.php (100%) rename {build => tests}/acceptance/features/bootstrap/FilesAppContext.php (100%) rename {build => tests}/acceptance/features/bootstrap/LoginPageContext.php (100%) rename {build => tests}/acceptance/features/bootstrap/NotificationContext.php (100%) rename {build => tests}/acceptance/features/bootstrap/SettingsMenuContext.php (100%) rename {build => tests}/acceptance/features/bootstrap/UsersSettingsContext.php (100%) rename {build => tests}/acceptance/features/core/Actor.php (100%) rename {build => tests}/acceptance/features/core/ActorAware.php (100%) rename {build => tests}/acceptance/features/core/ActorAwareInterface.php (100%) rename {build => tests}/acceptance/features/core/ActorContext.php (100%) rename {build => tests}/acceptance/features/core/Locator.php (100%) rename {build => tests}/acceptance/features/core/NextcloudTestServerContext.php (100%) rename {build => tests}/acceptance/features/core/NextcloudTestServerHelper.php (100%) rename {build => tests}/acceptance/features/core/NextcloudTestServerLocalHelper.php (100%) rename {build => tests}/acceptance/features/core/NoSuchElementException.php (100%) rename {build => tests}/acceptance/features/core/Utils.php (100%) rename {build => tests}/acceptance/features/login.feature (100%) rename {build => tests}/acceptance/installAndConfigureServer.sh (100%) rename {build => tests}/acceptance/run-local.sh (97%) rename {build => tests}/acceptance/run.sh (96%) diff --git a/.drone.yml b/.drone.yml index 60194f482c4..9b6a01bd4f0 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 allow-git-repository-modifications features/access-levels.feature + - tests/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 allow-git-repository-modifications features/login.feature + - tests/acceptance/run-local.sh allow-git-repository-modifications features/login.feature when: matrix: TESTS-ACCEPTANCE: login diff --git a/build/acceptance/composer.json b/tests/acceptance/composer.json similarity index 100% rename from build/acceptance/composer.json rename to tests/acceptance/composer.json diff --git a/build/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml similarity index 100% rename from build/acceptance/config/behat.yml rename to tests/acceptance/config/behat.yml diff --git a/build/acceptance/features/access-levels.feature b/tests/acceptance/features/access-levels.feature similarity index 100% rename from build/acceptance/features/access-levels.feature rename to tests/acceptance/features/access-levels.feature diff --git a/build/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/features/bootstrap/FeatureContext.php similarity index 100% rename from build/acceptance/features/bootstrap/FeatureContext.php rename to tests/acceptance/features/bootstrap/FeatureContext.php diff --git a/build/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php similarity index 100% rename from build/acceptance/features/bootstrap/FilesAppContext.php rename to tests/acceptance/features/bootstrap/FilesAppContext.php diff --git a/build/acceptance/features/bootstrap/LoginPageContext.php b/tests/acceptance/features/bootstrap/LoginPageContext.php similarity index 100% rename from build/acceptance/features/bootstrap/LoginPageContext.php rename to tests/acceptance/features/bootstrap/LoginPageContext.php diff --git a/build/acceptance/features/bootstrap/NotificationContext.php b/tests/acceptance/features/bootstrap/NotificationContext.php similarity index 100% rename from build/acceptance/features/bootstrap/NotificationContext.php rename to tests/acceptance/features/bootstrap/NotificationContext.php diff --git a/build/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php similarity index 100% rename from build/acceptance/features/bootstrap/SettingsMenuContext.php rename to tests/acceptance/features/bootstrap/SettingsMenuContext.php diff --git a/build/acceptance/features/bootstrap/UsersSettingsContext.php b/tests/acceptance/features/bootstrap/UsersSettingsContext.php similarity index 100% rename from build/acceptance/features/bootstrap/UsersSettingsContext.php rename to tests/acceptance/features/bootstrap/UsersSettingsContext.php diff --git a/build/acceptance/features/core/Actor.php b/tests/acceptance/features/core/Actor.php similarity index 100% rename from build/acceptance/features/core/Actor.php rename to tests/acceptance/features/core/Actor.php diff --git a/build/acceptance/features/core/ActorAware.php b/tests/acceptance/features/core/ActorAware.php similarity index 100% rename from build/acceptance/features/core/ActorAware.php rename to tests/acceptance/features/core/ActorAware.php diff --git a/build/acceptance/features/core/ActorAwareInterface.php b/tests/acceptance/features/core/ActorAwareInterface.php similarity index 100% rename from build/acceptance/features/core/ActorAwareInterface.php rename to tests/acceptance/features/core/ActorAwareInterface.php diff --git a/build/acceptance/features/core/ActorContext.php b/tests/acceptance/features/core/ActorContext.php similarity index 100% rename from build/acceptance/features/core/ActorContext.php rename to tests/acceptance/features/core/ActorContext.php diff --git a/build/acceptance/features/core/Locator.php b/tests/acceptance/features/core/Locator.php similarity index 100% rename from build/acceptance/features/core/Locator.php rename to tests/acceptance/features/core/Locator.php diff --git a/build/acceptance/features/core/NextcloudTestServerContext.php b/tests/acceptance/features/core/NextcloudTestServerContext.php similarity index 100% rename from build/acceptance/features/core/NextcloudTestServerContext.php rename to tests/acceptance/features/core/NextcloudTestServerContext.php diff --git a/build/acceptance/features/core/NextcloudTestServerHelper.php b/tests/acceptance/features/core/NextcloudTestServerHelper.php similarity index 100% rename from build/acceptance/features/core/NextcloudTestServerHelper.php rename to tests/acceptance/features/core/NextcloudTestServerHelper.php diff --git a/build/acceptance/features/core/NextcloudTestServerLocalHelper.php b/tests/acceptance/features/core/NextcloudTestServerLocalHelper.php similarity index 100% rename from build/acceptance/features/core/NextcloudTestServerLocalHelper.php rename to tests/acceptance/features/core/NextcloudTestServerLocalHelper.php diff --git a/build/acceptance/features/core/NoSuchElementException.php b/tests/acceptance/features/core/NoSuchElementException.php similarity index 100% rename from build/acceptance/features/core/NoSuchElementException.php rename to tests/acceptance/features/core/NoSuchElementException.php diff --git a/build/acceptance/features/core/Utils.php b/tests/acceptance/features/core/Utils.php similarity index 100% rename from build/acceptance/features/core/Utils.php rename to tests/acceptance/features/core/Utils.php diff --git a/build/acceptance/features/login.feature b/tests/acceptance/features/login.feature similarity index 100% rename from build/acceptance/features/login.feature rename to tests/acceptance/features/login.feature diff --git a/build/acceptance/installAndConfigureServer.sh b/tests/acceptance/installAndConfigureServer.sh similarity index 100% rename from build/acceptance/installAndConfigureServer.sh rename to tests/acceptance/installAndConfigureServer.sh diff --git a/build/acceptance/run-local.sh b/tests/acceptance/run-local.sh similarity index 97% rename from build/acceptance/run-local.sh rename to tests/acceptance/run-local.sh index bd5d6b09be1..ee7a4e6455c 100755 --- a/build/acceptance/run-local.sh +++ b/tests/acceptance/run-local.sh @@ -54,13 +54,13 @@ composer install cd ../../ echo "Installing and configuring Nextcloud server" -build/acceptance/installAndConfigureServer.sh +tests/acceptance/installAndConfigureServer.sh echo "Saving the default state so acceptance tests can reset to it" find . -name ".gitignore" -exec rm --force {} \; git add --all && echo 'Default state' | git -c user.name='John Doe' -c user.email='john@doe.org' commit --quiet --file=- -cd build/acceptance +cd tests/acceptance # Ensure that the Selenium server is ready before running the tests. echo "Waiting for Selenium" diff --git a/build/acceptance/run.sh b/tests/acceptance/run.sh similarity index 96% rename from build/acceptance/run.sh rename to tests/acceptance/run.sh index 8cb2bee621d..f9711cbb404 100755 --- a/build/acceptance/run.sh +++ b/tests/acceptance/run.sh @@ -118,7 +118,8 @@ function prepareDocker() { # "docker cp" does not take them into account (the extracted files are set # to root). echo "Copying local Git working directory of Nextcloud to the container" - tar --create --file="$NEXTCLOUD_LOCAL_TAR" --exclude=".git" --exclude="./config/config.php" --exclude="./data" --exclude="./data-autotest" --exclude="./tests" --directory=../../ . + tar --create --file="$NEXTCLOUD_LOCAL_TAR" --exclude=".git" --exclude="./build" --exclude="./config/config.php" --exclude="./data" --exclude="./data-autotest" --exclude="./tests" --directory=../../ . + tar --append --file="$NEXTCLOUD_LOCAL_TAR" --directory=../../ tests/acceptance/ docker exec $NEXTCLOUD_LOCAL_CONTAINER mkdir /nextcloud docker cp - $NEXTCLOUD_LOCAL_CONTAINER:/nextcloud/ < "$NEXTCLOUD_LOCAL_TAR" @@ -174,4 +175,4 @@ prepareSelenium prepareDocker echo "Running tests" -docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && build/acceptance/run-local.sh allow-git-repository-modifications $SCENARIO_TO_RUN" +docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && tests/acceptance/run-local.sh allow-git-repository-modifications $SCENARIO_TO_RUN"