]> source.dussan.org Git - nextcloud-server.git/commitdiff
Skip the insertIfNotExists() tests on Oracle because it doesn't work with clob
authorJoas Schilling <coding@schilljs.com>
Wed, 4 Nov 2020 15:40:31 +0000 (16:40 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 12 Nov 2020 11:57:51 +0000 (12:57 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
tests/lib/DB/ConnectionTest.php

index 5a2823ef28e61fadcc677838ff1d005eb5cbf09e..fa4d5fe005c3e287127c7569d0879d99eeb35edc 100644 (file)
@@ -203,6 +203,10 @@ class ConnectionTest extends \Test\TestCase {
        }
 
        public function testInsertIfNotExist() {
+               if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') === 'oci') {
+                       self::markTestSkipped('Insert if not exist does not work with clob on oracle');
+               }
+
                $this->makeTestTable();
                $categoryEntries = [
                        ['user' => 'test', 'category' => 'Family',    'expectedResult' => 1],
@@ -232,6 +236,10 @@ class ConnectionTest extends \Test\TestCase {
        }
 
        public function testInsertIfNotExistNull() {
+               if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') === 'oci') {
+                       self::markTestSkipped('Insert if not exist does not work with clob on oracle');
+               }
+
                $this->makeTestTable();
                $categoryEntries = [
                        ['addressbookid' => 123, 'fullname' => null, 'expectedResult' => 1],
@@ -255,6 +263,10 @@ class ConnectionTest extends \Test\TestCase {
        }
 
        public function testInsertIfNotExistDonTOverwrite() {
+               if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') === 'oci') {
+                       self::markTestSkipped('Insert if not exist does not work with clob on oracle');
+               }
+
                $this->makeTestTable();
                $fullName = 'fullname test';
                $uri = 'uri_1';
@@ -291,6 +303,10 @@ class ConnectionTest extends \Test\TestCase {
        }
 
        public function testInsertIfNotExistsViolating() {
+               if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') === 'oci') {
+                       self::markTestSkipped('Insert if not exist does not work with clob on oracle');
+               }
+
                $this->makeTestTable();
                $result = $this->connection->insertIfNotExist('*PREFIX*table',
                        [
@@ -321,6 +337,10 @@ class ConnectionTest extends \Test\TestCase {
         * @param array $compareKeys
         */
        public function testInsertIfNotExistsViolatingUnique($compareKeys) {
+               if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') === 'oci') {
+                       self::markTestSkipped('Insert if not exist does not work with clob on oracle');
+               }
+
                $this->makeTestTable();
                $result = $this->connection->insertIfNotExist('*PREFIX*table',
                        [