Commit Graph

20 Commits

Author SHA1 Message Date
Roeland Jago Douma 8bfa532075
Fix test race condition
E-tag propagation replies on the mtime of the file. Order of events:

1. add file 'foo.txt' with content 'bar'
2. Set mtime to now() - 1
3. Check if etag changed.

Now this goes right often when 1 and 2 happen in the same second.
However imagine

1. add file 'foo.txt' with content 'bar' (at t=0.999)
2. Set mtime to now() - 1 (at t=1.001)

Now the mtime will be set to the same time. Thus not chaning the etag.
2016-05-11 14:07:37 +02:00
Roeland Jago Douma 92abb5f23d
Fix tests 2016-04-19 14:04:00 +02:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Robin Appelman 3d5a7b307f Add test case for group share propagation 2015-12-10 13:53:50 +01:00
Thomas Müller 3bb6dcea64 Apply DB group annotation ... 2015-11-30 10:55:05 +01:00
Robin Appelman a95d4c2b22 update tests 2015-11-19 13:32:04 +01:00
Lukas Reschke 8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
Thomas Müller 17ffa4a244 Merge pull request #19414 from owncloud/swift_primary_storage_tests
Swift primary storage tests
2015-10-08 14:08:56 +02:00
Jörn Friedrich Dreyer 5646e39248 test objectstore with ceph docker
use default config for swift primary storage test config

allow testsuite to complete

fix timeout, script cleanup, enable debug for now

use btrfs loopback device, requires privileged container and absolute path

throw exception when storage has problems

debug by echo ...

sleep more, more debug
2015-10-06 16:27:25 +02:00
Robin Appelman 41f9946272 clear hooks for tests 2015-10-06 11:38:41 +02:00
Robin Appelman 0817024e6f Mark shares as dirty when changing permissions 2015-10-06 11:38:41 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Robin Appelman 7b70343dc3 fix infinite loops with propagating etags on reshares 2015-08-03 17:33:12 +02:00
Lukas Reschke d1f0ff372e Merge pull request #17163 from owncloud/update-licenses
Update license headers
2015-06-27 20:22:23 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Robin Appelman f847d9409e add unit test for single file share etag propagation 2015-06-24 18:16:03 +02:00
Vincent Petry 65fbb5eda0 Update etag of direct parent on unshare
Only call dirname() once instead of twice when propagating etags to the
recipient's parent folders.
2015-04-28 13:11:23 +02:00
Robin Appelman 83b8ac0d7b cleanup hooks 2015-04-27 14:07:16 +02:00
Robin Appelman d5434c9c4e more propagation tests 2015-04-27 14:07:16 +02:00