summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/installAndConfigureServer.sh
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-07-20 07:54:39 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-07-20 07:54:39 +0200
commit2fe8cad710a92eed6e463d1b5b67d44ca9197f87 (patch)
tree0f11262444c144a6049ec000a5f81f1acb8fce3f /tests/acceptance/installAndConfigureServer.sh
parent8e9c12eed92642748111bbc2acaf4bf071526a43 (diff)
downloadnextcloud-server-2fe8cad710a92eed6e463d1b5b67d44ca9197f87.tar.gz
nextcloud-server-2fe8cad710a92eed6e463d1b5b67d44ca9197f87.zip
Add option to acceptance test runner to set the Nextcloud server domain
By default "127.0.0.1" is used, so nothing needs to be set when the Selenium server and the Nextcloud test server share the same network (like when called by "run.sh"). Besides passing the domain to the acceptance tests the Nextcloud test server configuration must be modified to see the given domain as a trusted domain; otherwise the access would be forbidden. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/installAndConfigureServer.sh')
-rwxr-xr-xtests/acceptance/installAndConfigureServer.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/acceptance/installAndConfigureServer.sh b/tests/acceptance/installAndConfigureServer.sh
index 2fbdf821f77..c61faeda238 100755
--- a/tests/acceptance/installAndConfigureServer.sh
+++ b/tests/acceptance/installAndConfigureServer.sh
@@ -25,6 +25,18 @@
set -o errexit
+NEXTCLOUD_SERVER_DOMAIN=""
+if [ "$1" = "--nextcloud-server-domain" ]; then
+ NEXTCLOUD_SERVER_DOMAIN=$2
+
+ shift 2
+fi
+
php occ maintenance:install --admin-pass=admin
OC_PASS=123456acb php occ user:add --password-from-env user0
+
+if [ "$NEXTCLOUD_SERVER_DOMAIN" != "" ]; then
+ # Default first trusted domain is "localhost"; replace it with given domain.
+ php occ config:system:set trusted_domains 0 --value="$NEXTCLOUD_SERVER_DOMAIN"
+fi