Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-06-30 10:06:19 +0300
committerGitHub <noreply@github.com>2016-06-30 10:06:19 +0300
commit3acdc1339d0d7b04357bc05013a0f13521792961 (patch)
tree00ec686ded1b86a19dd8212792b4509920dd46fa
parent83a046a0fb2d35267ff6866d431b77f053ef8947 (diff)
parent01829e8d7cf42b54308046e10a62babe39111ea6 (diff)
Merge pull request #206 from nextcloud/ci-mysql
Add mysql job to CI
-rw-r--r--.drone.yml14
m---------3rdparty0
-rwxr-xr-xautotest.sh16
-rw-r--r--tests/lib/Files/Cache/CacheTest.php8
4 files changed, 32 insertions, 6 deletions
diff --git a/.drone.yml b/.drone.yml
index 4d0a0aba2a8..fc86e72c2b9 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -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:
@@ -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
diff --git a/3rdparty b/3rdparty
-Subproject 509385e674563e48a977bf8285c826963835528
+Subproject 46668812ff12d320ba207f120bd50acffa6e774
diff --git a/autotest.sh b/autotest.sh
index f237f8aa11a..5f5633fcf0f 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -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
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php
index 615bb32f62c..bfc3c1be7b8 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -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();
@@ -108,6 +110,12 @@ class CacheTest extends \Test\TestCase {
* @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');