rclone/fstest/testserver/init.d/TestWebdavOwncloud
Nick Craig-Wood 24ef00a258 build: implement a framework for starting test servers during tests
Test servers are implemented by docker containers and run real servers
for rclone to test against.
2020-01-18 16:47:37 +00:00

31 lines
794 B
Bash
Executable file

#!/bin/bash
set -e
NAME=owncloud
USER=rclone
PASS=HarperGrayerFewest5
. $(dirname "$0")/docker.bash
start() {
docker run --rm -d --name $NAME \
-e "OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN}" \
-e "OWNCLOUD_DB_TYPE=sqlite" \
-e "OWNCLOUD_DB_NAME=oowncloud.db" \
-e "OWNCLOUD_ADMIN_USERNAME=$USER" \
-e "OWNCLOUD_ADMIN_PASSWORD=$PASS" \
-e "OWNCLOUD_MYSQL_UTF8MB4=true" \
-e "OWNCLOUD_REDIS_ENABLED=false" \
-e "OWNCLOUD_TRUSTED_DOMAINS=*.*.*.*" \
owncloud/server
echo type=webdav
echo url=http://$(docker_ip):8080/remote.php/webdav/
echo user=$USER
echo pass=$(rclone obscure $PASS)
echo vendor=owncloud
echo _connect=$(docker_ip):8080
}
. $(dirname "$0")/run.bash