aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-04-09 13:38:58 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-04-09 21:50:30 +0200
commitf6d34587a2d5d217484d5d4d4d9b9ec5ac7df844 (patch)
tree3caadc8f7c4361e86e33205cfcce9d3bb33c1609
parentdb6fa03ad69574e667b74427a31c4c7b1813d8f9 (diff)
downloadnextcloud-server-f6d34587a2d5d217484d5d4d4d9b9ec5ac7df844.tar.gz
nextcloud-server-f6d34587a2d5d217484d5d4d4d9b9ec5ac7df844.zip
Use Docker image for acceptance tests
The Docker image for acceptance tests provides support for both the PHP built-in web server and the Apache web server; the acceptance tests for the server are run on the PHP built-in web server, but the acceptance tests for some apps will have to be run on the Apache web server (for example, Talk, as it uses long polling), so a Docker image to support both cases has to be used in "run.sh". ".drone.yml" was just updated for consistency, although it was not really needed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--.drone.yml12
-rwxr-xr-xtests/acceptance/run.sh6
2 files changed, 11 insertions, 7 deletions
diff --git a/.drone.yml b/.drone.yml
index c6f35114a25..e6bb7b78caa 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -543,42 +543,42 @@ pipeline:
matrix:
TESTS: integration-remote-api
acceptance-access-levels:
- image: nextcloudci/integration-php7.0:integration-php7.0-6
+ image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
commands:
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-access-levels --selenium-server selenium:4444 allow-git-repository-modifications features/access-levels.feature
when:
matrix:
TESTS-ACCEPTANCE: access-levels
acceptance-app-comments:
- image: nextcloudci/integration-php7.0:integration-php7.0-6
+ image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
commands:
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-comments --selenium-server selenium:4444 allow-git-repository-modifications features/app-comments.feature
when:
matrix:
TESTS-ACCEPTANCE: app-comments
acceptance-app-files:
- image: nextcloudci/integration-php7.0:integration-php7.0-6
+ image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
commands:
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files --selenium-server selenium:4444 allow-git-repository-modifications features/app-files.feature
when:
matrix:
TESTS-ACCEPTANCE: app-files
acceptance-app-theming:
- image: nextcloudci/integration-php7.0:integration-php7.0-6
+ image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
commands:
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-theming --selenium-server selenium:4444 allow-git-repository-modifications features/app-theming.feature
when:
matrix:
TESTS-ACCEPTANCE: app-theming
acceptance-header:
- image: nextcloudci/integration-php7.0:integration-php7.0-6
+ image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
commands:
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-header --selenium-server selenium:4444 allow-git-repository-modifications features/header.feature
when:
matrix:
TESTS-ACCEPTANCE: header
acceptance-login:
- image: nextcloudci/integration-php7.0:integration-php7.0-6
+ image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
commands:
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-login --selenium-server selenium:4444 allow-git-repository-modifications features/login.feature
when:
diff --git a/tests/acceptance/run.sh b/tests/acceptance/run.sh
index d9153822841..f2bc66048d7 100755
--- a/tests/acceptance/run.sh
+++ b/tests/acceptance/run.sh
@@ -138,7 +138,7 @@ function prepareDocker() {
# Selenium server.
# The container exits immediately if no command is given, so a Bash session
# is created to prevent that.
- docker run --detach --name=$NEXTCLOUD_LOCAL_CONTAINER --network=container:$SELENIUM_CONTAINER --interactive --tty nextcloudci/php7.1:php7.1-15 bash
+ docker run --detach --name=$NEXTCLOUD_LOCAL_CONTAINER --network=container:$SELENIUM_CONTAINER --interactive --tty nextcloudci/acceptance-php7.1:acceptance-php7.1-2 bash
# Use the $TMPDIR or, if not set, fall back to /tmp.
NEXTCLOUD_LOCAL_TAR="$($MKTEMP --tmpdir="${TMPDIR:-/tmp}" --suffix=.tar nextcloud-local-XXXXXXXXXX)"
@@ -153,6 +153,10 @@ function prepareDocker() {
docker exec $NEXTCLOUD_LOCAL_CONTAINER mkdir /nextcloud
docker cp - $NEXTCLOUD_LOCAL_CONTAINER:/nextcloud/ < "$NEXTCLOUD_LOCAL_TAR"
+ # Link the default Apache directory to the root directory of the Nextcloud
+ # server to make possible to run the Nextcloud server on Apache if needed.
+ docker exec $NEXTCLOUD_LOCAL_CONTAINER ln --symbolic /nextcloud /var/www/html
+
# run-local.sh expects a Git repository to be available in the root of the
# Nextcloud server, but it was excluded when the Git working directory was
# copied to the container to avoid copying the large and unneeded history of