Skip to content

Commit a2a7eb2

Browse files
Added creation of test group in database
1 parent d562ec4 commit a2a7eb2

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

owncloud/test/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def test_share_with_group(self, file_name):
611611
path = self.test_root + file_name
612612
self.assertTrue(self.client.put_file_contents(path, 'hello world!'))
613613

614-
share_info = self.client.share_file_with_group(path, self.test_group)
614+
share_info = self.client.share_file_with_group(path, self.test_group, perms=31)
615615

616616
self.assertTrue(self.client.is_shared(path))
617617
self.assertTrue(isinstance(share_info, owncloud.GroupShare))

travis-build/install_oc.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,18 @@ function execute_tests {
7373
php -f index.php
7474
echo "END INDEX"
7575

76-
echo "Insert test users"
77-
for USER in $USERS; do
78-
sqlite3 $DATADIR/owncloud.db "INSERT INTO oc_users (uid,displayname,password) VALUES ('$USER','$USER','x');"
79-
done
76+
echo "Insert test users"
77+
for USER in $USERS; do
78+
sqlite3 $DATADIR/owncloud.db "INSERT INTO oc_users (uid,displayname,password) VALUES ('$USER','$USER','x');"
79+
done
80+
81+
sqlite3 $DATADIR/owncloud.db "INSERT INTO oc_groups (gid) VALUES ('my_test_group');"
82+
83+
#Useful check if something goes wrong.
84+
echo "Selecting all groups:"
85+
sqlite3 $DATADIR/owncloud.db "SELECT * FROM oc_groups;"
86+
echo "Selecting all users:"
87+
sqlite3 $DATADIR/owncloud.db "SELECT * FROM oc_users;"
8088
}
8189

8290
#

0 commit comments

Comments
 (0)