Repository navigation
Add morrisjobke/webdav docker container for external storage tests - #16688
Conversation
|
Any solution at hand to get rid of the failing tests? We can only set this up on jenkins once we are green - otherwise this will no detect regressions. Just saying .... |
|
I'll see what I can do |
|
@PVince81 Are you sure the WebDAV server works as intended? Maybe it's also a problem with the docker setup. 🙈 |
|
Well some of the fails are about overwriting, maybe Apache's Webdav server doesn't let people overwrite with a MOVE operation like other servers does. But from your past comments I had the feeling that the docker instance did not work AT ALL (100% fail) but here it seems to work fine for most cases. |
|
Something seems odd with this DAV server: It doesn't properly move. If you compare with an ownCloud server: Maybe Apache with mod_dav behaves differently or needs config tweaks. |
|
Yep, it must be the server. |
|
I think I found the problem: when doing a Webdav MOVE operation, a "Destination" header must be specified with the full URL to the destination, not relative. Since we are outside the docker instance, the URL is the one of the docker instance, not the one inside. However the Webdav server would only understand it if it was its own internal URL. |
|
Also happening on my VirtualBox VM when connecting to the Webdav server from outside it. |
|
Strangely renaming files work, maybe Apache is clever enough to find out that it's the same file. But moving folders doesn't (neither in cadaver not ownCloud). |
|
Okay, it seems that:
|
95b5eb9 to
1177969
Compare
|
A new inspection was created. |
|
Solved the move/copy + overwrite issue by adding a trailing slash, see 1177969 Still, there is the |
|
|
Still have trouble with the stat tests |
lets move this to 9.0 |
|
Looks like either the target DAV server doesn't support "touch" (PROPPATCH with getlastmodified) or we're doing the touch wrong |
|
Usually a proppatch should return a list of updated properties. So we should check whether the "lastmodified" property was actually set, and if not return false. |
|
Indeed, in general Webdav servers do not let you modify "lastmodified": http://stackoverflow.com/a/17979769 |
|
Looks like Sabre doesn't return the PROPPATCH response, so we cannot find out whether the server accepted the property. Raised here https://github.com/fruux/sabre-dav/issues/726 |
|
The next step here is: wait for 8.1.4 to be released because it contains the PROPPATCH fix #19738 which will then appear in the owncloud docker instance. This should at least make the "touch()" operation work properly in that case. |
1177969 to
ff52bd6
Compare
|
It was suggested here that ownCloud could advertise supporting PROPP #22499 (comment) If we do this, it would be possible to check that DAV header before attempting a touch. If the server does not advertise that it supports it, then we fallback to the other logic when touch is not supported. |
|
=> discussed with @MorrisJobke and we'll have a look at doing this: after a touch, do a PROPFIND on the target to make sure the mtime was properly accepted. This is needed to find out whether to use the touch fallback. |
ff52bd6 to
a76e1e4
Compare
|
Done, I added another PROPFIND after PROPPATCH to check if touch succeeded: a76e1e4 Please review @MorrisJobke @icewind1991 @nickvergessen @blizzz |
|
|
||
| return array( | ||
| 'run'=>true, | ||
| 'host'=>'localhost:$port/webdav/', |
There was a problem hiding this comment.
This will fail on Jenkins. Please use the IP address of the container like in
|
Beside my above comment this works really nice 👍 |
| # | ||
| # Set environment variable DEBUG to print config file | ||
| # | ||
| # @author Morris Jobke |
There was a problem hiding this comment.
I didn't know that I've written this alone ;)
a76e1e4 to
0a2712f
Compare
|
Rebased and adjusted env scripts to work on CI |
|
Ah, stupid thing, it hung on the last test. Almost won 😦 Rebasing... |
0a2712f to
46d2531
Compare
|
Can you guys review this ? @MorrisJobke @DeepDiver1975 @Xenopathic @icewind1991 Note that it also comes with some fixes for non-ownCloud webdav |
|
Looks good 👍 |
|
Second review please @icewind1991 @Xenopathic @DeepDiver1975 @rullzer |
The trailing slash is needed when talking to Apache's mod_dav server
ownCloud as remote DAV always accepts the mtime on touch, but other servers like Apache's DAV server doesn't. The latter doesn't give any visible hint in its response to detect this case, so this fix does a subsequent PROPFIND to check whether the mtime was actually set. Since a touch() operation seldom happens (only on uploads), the minor performance loss should hopefully be acceptable.
46d2531 to
d201ffe
Compare
|
👍 |
|
We're past feature freeze, however this only adds tests + a bugfix for DAV, so this is acceptable. Merging. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #15897
Note: not all tests pass yet. This is only about introducing the instance.
These are my results:
Please review @MorrisJobke @DeepDiver1975 @Xenopathic