-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tests-Only] Added API test for public link Mtime #37589
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add tests:
- check the mtime if the share is a share of a folder and not a file
- upload as public with a historic mtime (share is a file or folder, different permissions (e.g. upload only, upload and read) - check that the mtime is reported correctly through the webdav interface of the user
- upload as public overwriting an existing file and setting the mtime
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #37589 +/- ##
=========================================
Coverage 64.71% 64.71%
Complexity 19359 19359
=========================================
Files 1281 1281
Lines 75637 75637
Branches 1333 1333
=========================================
Hits 48949 48949
Misses 26296 26296
Partials 392 392
Continue to review full report at Codecov.
|
a0ed56e
to
b0ae828
Compare
fix was added in owncloud/web#3686 (review) |
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't implement tests using the old public link webdav API, nobody cares about it and it will never be implemented in OCIS
And the mtime of file "file.txt" in the last shared public link using the WebDAV API should be "Thu, 08 Aug 2019 04:18:13 GMT" | ||
|
||
@issue-ocis-reva-49 @issue-37605 | ||
Scenario: Get the mtime of a file inside a folder shared by public link using old dav version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old or new? the test says "new"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
e88d8a6
to
e394902
Compare
$mtime = \implode(" ", $mtime); | ||
Assert::assertContains( | ||
$mtime, | ||
(new TestHelpers\WebDavHelper)->getMtimeOfFileinPublicLinkShare($baseUrl, $fileName, $token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need that construct?
shouldn't \TestHelpers\WebDavHelper::getMtimeOfFileinPublicLinkShare($baseUrl, $fileName, $token)
work? The functions in the TestHelpers should all be static
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try the tests also on ocis/ocis-reva repository.
If they work its great, if not we need to open issues, skip the existing tests and make tests that show the issues in ocis
tests/TestHelpers/WebDavHelper.php
Outdated
* @return string | ||
* @throws Exception | ||
*/ | ||
public function getMtimeOfFileinPublicLinkShare( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make the function static like all others
| permissions | read,update,create,delete | | ||
When the public uploads file "file.txt" to the last shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API | ||
Then as "Alice" file "testFolder/file.txt" should exist | ||
And the mtime of file "file.txt" in the last shared public link using the WebDAV API should not be "Thu, 08 Aug 2019 04:18:13 GMT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the mtime also through the "normal" webDAV api
Description
API Acceptance test for public link mtime is added
Related Issue
Fixes owncloud/ocis-reva#296
How Has This Been Tested?
Types of changes
Checklist: