Commit Graph

45 Commits

Author SHA1 Message Date
Joas Schilling 85a0e10b4f
Update the tests to the comparison logic
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-12-17 13:52:09 +01:00
Morris Jobke fd8eeccb15
Merge pull request #11942 from nextcloud/techdebt/noid/use-count-function
Use the defined func()->count() instead of manual counting
2018-11-12 17:43:56 +01:00
Morris Jobke 8e60006744
Exception is not thrown anymore
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-12 12:22:04 +01:00
Joas Schilling bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-08 15:44:45 +01:00
Daniel Kesselberg 04a316aa67
Add test that unique constraint is working
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-11-06 21:29:20 +01:00
Roeland Jago Douma fe286e21ca
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-08-08 12:58:50 +02:00
Joas Schilling 008c8dde1a
Ignore custom prefixes which are longer
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 14:45:22 +02:00
Joas Schilling 960961148e
Fix calculation of default name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 14:45:21 +02:00
Joas Schilling 14682dfa7c
Add unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 14:45:21 +02:00
Robin Appelman 3047ef31bd
Add count to function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-06-14 14:32:22 +02:00
Morris Jobke a4cb83df27
Add tests for special domain name
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-19 13:59:08 +02:00
Morris Jobke d686b19a16
Add tests for domains
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-19 13:58:02 +02:00
Joas Schilling 78ee3abb78
Move regex to a function and add tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-19 12:49:36 +02:00
Robin Appelman 89a9d35d90 dont keep shared database locks when running cli scripts
For cli scripts we don't have the assumption that the universe will be cleaned up soon

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-04-11 19:21:45 +02:00
Morris Jobke 2b335fd607
Use insertIfNotExist of the new interface
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-12 17:45:49 +01:00
Morris Jobke de56915605
Merge pull request #7419 from Abijeet/feature-7175
Fixes #7175 - Allow to search for email address in user management
2018-03-06 21:53:37 +01:00
Joas Schilling bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:25 +01:00
Joas Schilling 4a5282ba21
Fix the type hints of migrations and correctly inject the wrapped schema into migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-17 11:37:36 +01:00
Robin Appelman 42b3aa3a0a
reuse query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-01-12 13:57:55 +01:00
Robin Appelman aad01894e3
refactor user searching
add additional user searching tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-12-20 15:51:37 +01:00
Robin Appelman da3004b8f5
add postgresql10 compatibility to dbal
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-11-22 17:57:17 +01:00
Piotr Mrowczynski 6a51c1bc4f
Add foreign key support to OC 2017-10-30 18:57:19 +01:00
Joas Schilling a3bdb318e9
Fix bigint handling on postgres
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-29 11:10:57 +02:00
Joas Schilling 293dea0625
Fix querybuilder and functionbuilder tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Morris Jobke 163e8774a4 Fix autoloader and namespace test
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-05 15:46:25 +02:00
Joas Schilling 4e5cd1efea Fix tests of CodeChecker and MigrationService
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:02:16 +02:00
Joas Schilling 15eec7b83c Start migrations
Fixme:
- Install and update of apps
- No revert on live systems (debug only)
- Service adjustment to our interface
- Loading via autoloader

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Morris Jobke a045f3c4d7 Merge pull request #4146 from nextcloud/unread-comments-folder
Allow getting the unread comment count for an entire folder at once
2017-04-10 13:21:39 -05:00
Robin Appelman 48df99f2e0
fix quote helper test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 12:49:05 +02:00
Robin Appelman d4a7cfec7c
rename fun to func
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:15:06 +02:00
Robin Appelman fee818f493
Add tests for query builder (i)like
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:15:03 +02:00
Robin Appelman 4279b13270
Add function builder to the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:09:26 +02:00
Robin Appelman a65652fc1e
add support for escaping like parameters when using the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:09:22 +02:00
Morris Jobke 713f684a8b
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes

Add config option to update charset of mysql to utf8mb4

* fully optional
* requires additional options set in the database

only disable unicode test on mysql

Fixing ctor call

Adding docker based unit test execution for mysql utf8mb4

Add mysqlmb4 test configuration to Jenkinsfile

fix collation on utf8mb4

Properly setup charset and collation in the doctrine connection

Allow files containing 4-byte chars in case the database supports it

During setup of a mysql database we try to detect if charset 'utf8mb4' can be used

Fix mysql settings

Add console command to migrate the charset

Set ROW_FORMAT before setting collation to mb4

Also select tables with wrong collation

Faster MySQL docker

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-21 16:42:12 -06:00
Morris Jobke d99ce3971b
Namespace and array syntax fixes
* minor fixes in preparation of a bigger DB and config PR

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 14:52:54 -06:00
Philipp Schaffrath 2ccf544ad7
Fixed failing test which was ignoring a required (not null) column (#26303)
* Fixed failing test which was ignoring a required (not null) column

* restored test to original, catching DriverException which also catches ConstraintViolationException

* catch ConstraintViolationException again

* removed unnecessary field from this test

* clobfield should be nullable

* clobfield now is nullable

* removed autoincrement since whenever this strategy is enabled, oracle would not throw constraint violation exceptions (needed for setValues), which mysql still does

* this field does not auto increment anymore

* mark integerfield as primary, since it is not getting marked as such through auto increment anymore,
integerfield default always has been 0 instead of null

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-17 00:09:07 -06:00
Robin Appelman bca91f2216
remove static:// stream wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-04 15:57:02 +01:00
Lukas Reschke a8b7df9cc1
Add tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 21:10:51 +01:00
Joas Schilling 2c4035e806
Inject config and logger
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-02 20:30:37 +01:00
Joas Schilling 17a2723948
Fix the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-19 00:15:01 +02:00
Morris Jobke 296a3274cf
only disable unicode test on mysql 2016-10-19 00:15:01 +02:00
Morris Jobke 972e560e72
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes
2016-10-19 00:15:01 +02:00
Thomas Müller b1641cc113
Fix QueryBuilderTests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-11 12:30:46 +02:00
Thomas Müller b55ab6d22a Various database migration fixes (#25209)
* String columns with a length higher then 4000 are converted into a CLOB columns automagically - we have to respect this when migrating

* Adding schema migration tests to prevent unnecessary and non-sense migration steps
Fix Oracle autoincrement and unsigned handling

* Fix sqlite integer type for autoincrement

* Use lower case table names - fixes pg

* Fix postgres with default -1 - this only affect pg 9.4 servers - 9.5 seems to work fine
2016-06-29 14:54:41 +02:00
Joas Schilling 94ad54ec9b Move tests/ to PSR-4 (#24731)
* Move a-b to PSR-4

* Move c-d to PSR-4

* Move e+g to PSR-4

* Move h-l to PSR-4

* Move m-r to PSR-4

* Move s-u to PSR-4

* Move files/ to PSR-4

* Move remaining tests to PSR-4

* Remove Test\ from old autoloader
2016-05-20 15:38:20 +02:00