Skip to content

Fix DAV exceptions, some will still return false now - #13791

Merged
DeepDiver1975 merged 1 commit into
masterfrom
extstorage-fixdavexceptions
Feb 3, 2015
Merged

DeepDiver1975 merged 1 commit into
masterfrom
extstorage-fixdavexceptions

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Since the Storage interface isn't ready to work directly with exceptions
like Forbidden and NotFound, the DAV storage has been adapted to still
return false when expected. (I know it looks ugly, but it's a quickfix for now)

In the future we'll want to make all storage implementations work with exceptions, and that will make it possible to change the unit test to expect that. For now: using return false when it makes sense.

@MorrisJobke please run the webdav unit tests (I tested this with the owncloud.php test suite)

Please review @icewind1991 @DeepDiver1975

Since the Storage interface isn't ready to work directly with exceptions
like Forbidden and NotFound, the DAV storage has been adapted to still
return false when expected.
@PVince81

Copy link
Copy Markdown
Contributor Author

Fixes #13754

@PVince81 PVince81 added this to the 8.0-current milestone Jan 30, 2015
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@ghost

ghost commented Jan 30, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/8380/
🚀 Test PASSed. 🚀

@icewind1991

Copy link
Copy Markdown
Contributor

makes sense 👍

@MorrisJobke

Copy link
Copy Markdown
Contributor

Tests are passing again:

mjob@wigrid:~/Projekte/owncloud/master(extstorage-fixdavexceptions○) » ./autotest-external.sh sqlite
Using database oc_autotest
Setup environment for sqlite testing ...
INDEX
creating sqlite db
END INDEX
Testing with sqlite ...
files_external enabled
No coverage
start: start-webdav-ownCloud.sh
name: webdav-ownCloud
Docker executable found - setup docker
Fetch recent morrisjobke/owncloud docker image
Pulling repository morrisjobke/owncloud
54d99f7176ee: Download complete 
f81e2e4bf8c1: Download complete 
bfa6c4fa6f3e: Download complete 
5397338f09e1: Download complete 
6d441473953b: Download complete 
a0664069abf6: Download complete 
8711caa0e48b: Download complete 
9521f1cd148c: Download complete 
a21a912ecb21: Download complete 
33ee5a7d3e6b: Download complete 
c974fbc04304: Download complete 
c8266ff9921a: Download complete 
e3f7d3c88aa3: Download complete 
e7289a9cdde1: Download complete 
dfc5365a906a: Download complete 
8ae8738b82a3: Download complete 
15bf2e8e18e9: Download complete 
d9524181e7e4: Download complete 
041796ce38f4: Download complete 
9a76e263508e: Download complete 
ddfd65a6137b: Download complete 
38ae5fdae5af: Download complete 
2908d78c5391: Download complete 
04dab49c6d45: Download complete 
a215e3211ebc: Download complete 
Status: Image is up to date for morrisjobke/owncloud:latest
Waiting 30 seconds for ownCloud initialization ... 
ownCloud container: a0e080c4ce8365dbfa98ec833e70ce946147dd023528c4afdc478da208019a5d
No coverage
PHPUnit 4.3.5 by Sebastian Bergmann.

Configuration read from /home/mjob/Projekte/owncloud/master/tests/phpunit-autotest-external.xml

..........................................................

Time: 9.61 minutes, Memory: 13.00Mb

OK (58 tests, 278 assertions)
stop: stop-webdav-ownCloud.sh
Docker executable found - stop and remove docker containers
a0e080c4ce8365dbfa98ec833e70ce946147dd023528c4afdc478da208019a5d
Stopping and removing docker container a0e080c4ce8365dbfa98ec833e70ce946147dd023528c4afdc478da208019a5d
a0e080c4ce8365dbfa98ec833e70ce946147dd023528c4afdc478da208019a5d

I give a halt 👍 because I cannot judge on the actual change, but just on the outcome ;)

@DeepDiver1975

Copy link
Copy Markdown
Contributor

The DAV storage is used by s2s as well - right?

Needs to be tested as well from my understanding

@PVince81

Copy link
Copy Markdown
Contributor Author

Yes, true. It might work even better than before because most of the API calls expect to return false instead of throwing exceptions.

@icewind1991

Copy link
Copy Markdown
Contributor

Cant find any problem with s2s

@DeepDiver1975

Copy link
Copy Markdown
Contributor

here we go then - THX for testing

DeepDiver1975 added a commit that referenced this pull request Feb 3, 2015
Fix DAV exceptions, some will still return false now
@DeepDiver1975
DeepDiver1975 merged commit 9e222ec into master Feb 3, 2015
@DeepDiver1975
DeepDiver1975 deleted the extstorage-fixdavexceptions branch February 3, 2015 12:31
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants