Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ build:
- git submodule update --init
- ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
- ./autotest.sh sqlite
mysql:
image: morrisjobke/nextcloud-ci-php7:1.0.4
commands:
- sleep 15 # gives the database enough time to initialize
- rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues
- git submodule update --init
- ./autotest.sh mysql
postgres:
image: morrisjobke/nextcloud-ci-php7:1.0
commands:
Expand All @@ -33,3 +40,10 @@ compose:
environment:
- POSTGRES_USER=oc_autotest
- POSTGRES_PASSWORD=oc_autotest
mysql:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=owncloud
- MYSQL_USER=oc_autotest
- MYSQL_PASSWORD=owncloud
- MYSQL_DATABASE=oc_autotest
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "3rdparty"]
path = 3rdparty
url = https://github.com/owncloud/3rdparty.git
url = https://github.com/nextcloud/3rdparty.git
2 changes: 1 addition & 1 deletion 3rdparty
16 changes: 10 additions & 6 deletions autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,16 @@ function execute_tests {
echo "MySQL is up."

else
if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
echo "Your mysql binary is not provided by mysql"
echo "To use the docker container set the USEDOCKER environment variable"
exit -1
fi
mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
echo "Your mysql binary is not provided by mysql"
echo "To use the docker container set the USEDOCKER environment variable"
exit -1
fi
mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
else
DATABASEHOST=127.0.0.1
fi
fi
fi
if [ "$DB" == "mariadb" ] ; then
Expand Down
8 changes: 8 additions & 0 deletions tests/lib/Files/Cache/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
namespace Test\Files\Cache;


use Doctrine\DBAL\Platforms\MySqlPlatform;

class LongId extends \OC\Files\Storage\Temporary {
public function getId() {
return 'long:' . str_repeat('foo', 50) . parent::getId();
Expand Down Expand Up @@ -108,6 +110,12 @@ public function testPartial() {
* @dataProvider folderDataProvider
*/
public function testFolder($folder) {
if(strpos($folder, 'F09F9890')) {
// 4 byte UTF doesn't work on mysql
if(\OC::$server->getDatabaseConnection()->getDatabasePlatform() instanceof MySqlPlatform) {
$this->markTestSkipped('MySQL doesn\'t support 4 byte UTF-8');
}
}
$file2 = $folder.'/bar';
$file3 = $folder.'/foo';
$data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
Expand Down