Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

Add dav endpoint version support - #191

Merged
PVince81 merged 1 commit into
masterfrom
newendpoint
Mar 31, 2017
Merged

Add dav endpoint version support#191
PVince81 merged 1 commit into
masterfrom
newendpoint

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

If the endpoint version is specified in the constructor, use that.
Else read it from the capabilities call.

@PVince81 PVince81 added this to the 0.5 milestone Mar 29, 2017
@mention-bot

Copy link
Copy Markdown

@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @soalhn, @individual-it and @Gomez to be potential reviewers.

@PVince81

Copy link
Copy Markdown
Contributor Author

Looks like it's not possible to make it skip the whole class that tests DAV v1.

Skipping in setUp only seems to skip the first test. Then the other tests likely aren't running setUp again like in PHP, so the check is not done.

I could use a skip decorator but it needs to be applied on ALL tests.

Need to think of a better way...

@PVince81

Copy link
Copy Markdown
Contributor Author

Now added a custom decorator to skip the test class in case DAV v1.0 is detected.
Let's see if that works...

@PVince81

Copy link
Copy Markdown
Contributor Author

All tests passed now, will cleanup the history

If the endpoint version is specified in the constructor, use that.
Else read it from the capabilities call.
@PVince81

Copy link
Copy Markdown
Contributor Author

@SergioBertolinSG please review

@SergioBertolinSG

SergioBertolinSG commented Mar 30, 2017

Copy link
Copy Markdown
Contributor

Locally i am seeing a couple of failures: This is running against master. (10.0.0beta).

...................F..............................................F...............................................
======================================================================
FAIL: test_get_shares_empty (__main__.TestFileAccess)
Test get shares with empty result
----------------------------------------------------------------------
Traceback (most recent call last):
  File "owncloud/test/test.py", line 821, in test_get_shares_empty
    self.assertEquals(shares, [])
AssertionError: Lists differ: [ShareInfo(share_with_displayn... != []

First list contains 2 additional elements.
First extra element 0:
ShareInfo(share_with_displayname=None,mimetype=application/pdf,displayname_owner=admin,name=mcs.pdf link,share_type=3,file_target=/mcs.pdf,url=http://docker.oc.solidgear.es:62237/index.php/s/N8vdEdBClZhmamD,expiration=None,token=N8vdEdBClZhmamD,uid_file_owner=admin,displayname_file_owner=admin,stime=1490798855,share_with=None,storage_id=home::admin,path=/mcs.pdf,file_parent=2,permissions=1,id=63,uid_owner=admin)

Diff is 849 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_get_shares_empty (__main__.TestFileAccessDav1)
Test get shares with empty result
----------------------------------------------------------------------
Traceback (most recent call last):
  File "owncloud/test/test.py", line 821, in test_get_shares_empty
    self.assertEquals(shares, [])
AssertionError: Lists differ: [ShareInfo(share_with_displayn... != []

First list contains 2 additional elements.
First extra element 0:
ShareInfo(share_with_displayname=None,mimetype=application/pdf,displayname_owner=admin,name=mcs.pdf link,share_type=3,file_target=/mcs.pdf,url=http://docker.oc.solidgear.es:62237/index.php/s/N8vdEdBClZhmamD,expiration=None,token=N8vdEdBClZhmamD,uid_file_owner=admin,displayname_file_owner=admin,stime=1490798855,share_with=None,storage_id=home::admin,path=/mcs.pdf,file_parent=2,permissions=1,id=63,uid_owner=admin)

Diff is 849 characters long. Set self.maxDiff to None to see it.

----------------------------------------------------------------------
Ran 114 tests in 461.181s

FAILED (failures=2)

@PVince81

Copy link
Copy Markdown
Contributor Author

@SergioBertolinSG is the OC env you're testing against clean ?

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

Maybe not, I can try with a different "clean" one.

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

OK, with a clean server it has worked all fine.

@PVince81
PVince81 merged commit 4a96141 into master Mar 31, 2017
@PVince81
PVince81 deleted the newendpoint branch March 31, 2017 11:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants