aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/testsuits/caldav/install.sh
blob: ecbab3a1fd7e6ff0c40ce1602e64d3cdf469a088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
#
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
# SPDX-License-Identifier: AGPL-3.0-only
#
SCRIPT=`realpath $0`
SCRIPTPATH=`dirname $SCRIPT`


cd "$SCRIPTPATH"
if [ ! -f CalDAVTester/testcaldav.py ]; then
    git clone https://github.com/apple/ccs-caldavtester.git CalDAVTester
fi
if [ ! -f pycalendar/setup.py ]; then
    git clone https://github.com/apple/ccs-pycalendar.git pycalendar
fi

cd "$SCRIPTPATH/../../../../../"

# disable the trashbin, so recurrent deletion of the same object works
php occ config:app:set dav calendarRetentionObligation --value=0

# create test user
OC_PASS=user01 php occ user:add --password-from-env user01
php occ dav:create-calendar user01 calendar
php occ dav:create-calendar user01 shared
OC_PASS=user02 php occ user:add --password-from-env user02
php occ dav:create-calendar user02 calendar
cd "$SCRIPTPATH/../../../../../"