diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-04-16 13:39:59 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-04-19 08:26:57 +0200 |
commit | ed7d63d16a3e954841c40253a8a54223f6ae729e (patch) | |
tree | 6beda4f9a73f7a4c4a5a02fc86b05e0f4c578a3b /.drone.yml | |
parent | be96be09b599235c6b712d39f88760f10020508b (diff) | |
download | nextcloud-server-ed7d63d16a3e954841c40253a8a54223f6ae729e.tar.gz nextcloud-server-ed7d63d16a3e954841c40253a8a54223f6ae729e.zip |
Add acceptance test steps to Drone
Each acceptance test feature is run in its own Drone step. The container
of the step runs the acceptance tests themselves, but they require two
additional Drone services. One service provides the Selenium server that
performs the web browser actions specified by the tests, and the other
service provides the Nextcloud server that the tests will be run
against (due to security concerns the acceptance tests themselves can
not create Docker containers for the Nextcloud server as done when
running them in a local system, as if Drone containers had access to
Docker a malicious pull request could be used to take over the Drone
server).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to '.drone.yml')
-rw-r--r-- | .drone.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml index 2d4134957ad..16f4be6a39a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -478,6 +478,33 @@ pipeline: when: matrix: TESTS: integration-trashbin + # As it needs access to the cloned Git repository it must be defined in the + # pipeline as "detached" instead of in the services. + service-acceptance-nextcloud-server: + image: nextcloudci/acceptance-nextcloud-server-php7.1-apache + detach: true + commands: + # "nextcloud-server-control-setup.sh" can not be set as the entry point in + # the image because Drone overrides it. + - /usr/local/bin/nextcloud-server-control-setup.sh + - su --shell "/bin/sh" --command "php /usr/local/bin/nextcloud-server-control.php 12345" - www-data + when: + matrix: + TESTS: acceptance + acceptance-access-levels: + image: nextcloudci/php7.0:php7.0-7 + commands: + - build/acceptance/run-drone.sh features/access-levels.feature + when: + matrix: + TESTS-ACCEPTANCE: access-levels + acceptance-login: + image: nextcloudci/php7.0:php7.0-7 + commands: + - build/acceptance/run-drone.sh features/login.feature + when: + matrix: + TESTS-ACCEPTANCE: login nodb-codecov: image: nextcloudci/php7.0:php7.0-7 commands: @@ -551,6 +578,10 @@ matrix: - TESTS: integration-transfer-ownership-features - TESTS: integration-ldap-features - TESTS: integration-trashbin + - TESTS: acceptance + TESTS-ACCEPTANCE: access-levels + - TESTS: acceptance + TESTS-ACCEPTANCE: login - TESTS: jsunit - TESTS: check-autoloader - TESTS: check-mergejs @@ -626,5 +657,14 @@ services: when: matrix: OBJECT_STORE: s3 + selenium: + image: selenium/standalone-firefox:2.53.1-beryllium + environment: + # Reduce default log level for Selenium server (INFO) as it is too + # verbose. + - JAVA_OPTS=-Dselenium.LOGGER.level=WARNING + when: + matrix: + TESTS: acceptance branches: [ master, stable* ] |