Commit Graph

52 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer 17ef187681 add is* storage tests 2015-09-23 23:41:39 +02:00
Vincent Petry e15dd783ab Workaround for empty dir deletion for SFTP
Explicitly clear the stat cache after deleting an empty folder to make
sure it is properly detected as deleted in subsequent requests.

This works around a problem with phpseclib where the folder is properly
deleted remotely but the stat cache was not updated.
2015-06-18 17:40:38 +02:00
Vincent Petry 120588dd7a Disable update check test when testing wrappers
The checkUpdate test is intended for testing real storages, not
wrappers.
2015-06-02 15:14:37 +02:00
Vincent Petry c4cb93e644 Added storage backend test for checkUpdate
This helps testing whether checkUpdate properly returns false when no
change exists
2015-06-02 11:42:03 +02:00
Jan-Christoph Borchardt 4e93d9e3a2 remove logo-wide from tests 2015-05-21 22:40:26 +02:00
Robin Appelman 2213d6597c add tests for copyFromStorage with same storage 2015-05-19 17:30:32 +02:00
Thomas Müller 104d11ec4c Fixing encryption storage wrapper tests 2015-04-07 13:30:30 +02:00
Vincent Petry 5c9998179f Properly quote file names in listFiles query for GDrive 2015-03-31 15:14:03 +02:00
Lukas Reschke 53f67fc65d Revert "Properly quote file names in listFiles query for GDrive" 2015-03-31 15:12:35 +02:00
Vincent Petry 43588fe2f7 Properly quote file names in listFiles query for GDrive 2015-03-26 12:15:02 +01:00
Joas Schilling 76ebd3a050 Make apps/ extend the \Test\TestCase and fix overwritten methods 2014-11-19 14:52:09 +01:00
Adam Williamson e0ae87051f storage test: use new file for testTouchCreateFile()
this test would never succeed, because the previous test -
testFOpen() - creates the file 'foo', but testTouchCreateFile()
starts out by asserting it doesn't exist. Change the test to
use a file called 'touch' instead (which does not previously
exist).
2014-11-10 17:49:35 -08:00
Jörn Friedrich Dreyer 27bb968ffa make some storage tests explain what went wrong 2014-10-08 18:49:52 +02:00
Jörn Friedrich Dreyer 76c1095c25 add unit test for #8325 2014-08-14 17:18:46 +02:00
Robin Appelman 8c5521fdfc Add $storage->instanceOfStorage to handle instanceof for storage wrappers 2014-05-29 13:45:50 +02:00
Robin Appelman 03ba497a8c add recursive copy to local storage backend 2014-05-28 18:16:23 +02:00
Robin Appelman 38c1da0976 fix recursive rename for local storage backend 2014-05-28 18:16:23 +02:00
Robin Appelman c99e254178 aditional test cases for copy and rename 2014-05-28 18:16:23 +02:00
Thomas Müller a2efdb8722 Merge pull request #7970 from owncloud/webdav-upload-hash
Fix uploading files containing a # in the path for webdav
2014-04-03 16:09:44 +02:00
Vincent Petry d6ce45fe61 Correctly read the full stream in file_get_contents
When using user-defined stream wrappers, PHP will
return a maximum of 8192 bytes even if more was
requested.

This fix uses stream_get_contents to make sure the full stream is read
and not only the first 8 KB.

Added unit test with a bigger test file to cover this case.
2014-04-01 10:07:16 +02:00
Robin Appelman 76c63a5760 Fix uploading files containing a # in the path for webdav 2014-03-31 17:00:32 +02:00
Robin Appelman fffe330bbc Fix parameter order for Storage\Local::hash 2014-03-20 15:32:12 +01:00
Vincent Petry b2b35cd335 Fixed ext storage webdav path encoding
- Some WebDAV servers like lighttpd need paths in URLs to be properly
encoded
- Added error log output when curl connection failed
- Added check for 'resourcetype' in case the WebDAV server doesn't
  support/return it
- Fixed touch() to return false if the server doesn't implement
  PROPPATCH
- Added optional delay in WebDAV unit tests to use when testing against
  lighttpd's WebDAV
2014-02-19 18:34:08 +01:00
Vincent Petry 6cf9844e9c Added unit test for the test() method
This is to make sure that method isn't broken
2013-12-03 14:35:53 +01:00
Vincent Petry d69243ee51 Fixed FTP and SMB to use rmdir() when deleting folders
Some storages need to use different calls for deleting files or folders,
usually unlink() and rmdir().

Fixes #4532 (SMB dir deletion)
Fixes #5941 (FTP dir deletion)

Note that the extra is_dir() should be fast because it's read from the
stat cache.
2013-11-29 13:01:01 +01:00
Vincent Petry 2653d914d9 Merge pull request #6008 from owncloud/extstorage-smb-webdav-renamefix
Fixed SMB rename function to overwrite target file
2013-11-26 06:42:36 -08:00
Vincent Petry 712b47757a Updated unit tests for SMB
- coverage for touch return value
- fixed directory provider to exclude unsupported cases
2013-11-26 12:53:03 +01:00
Vincent Petry c3e34676ba Improved unit test for "overwrite on move"
Now using a different content to make sure the file was overwritten.
2013-11-25 18:54:58 +01:00
Vincent Petry af7118aa5d Added unit test for "overwrite file on rename/move"
Also fixed "rename" unit test that was ready the result out of the wrong
file.
2013-11-25 18:52:14 +01:00
Vincent Petry 5b6d1d79d0 Fixed SMB file deletion success detection
Since unlink() smb4php doesn't return true on deletion success, we need
to check whether the file was deleted to confirm success.

Fixes #5866
2013-11-19 15:05:11 +01:00
Jörn Friedrich Dreyer 10b2d649af extend unit test to directories starting or ending in whitespace 2013-10-31 14:24:43 +01:00
Thomas Müller c517c845f6 Merge branch 'master' into storage-test-cleanup
Conflicts:
	tests/lib/files/storage/storage.php
2013-07-24 01:01:36 +02:00
Robin Appelman cfac7fcd53 Storage: remove some unneeded strict tests of mtime behaviour 2013-07-16 23:07:35 +02:00
Robin Appelman 97f0bc1c4a Storage: remove tests for search 2013-07-16 23:05:23 +02:00
Christian Berendt 8c9e6db1b1 increasing allowed time difference 2013-07-08 15:03:55 +02:00
Christian Berendt 92e7392852 revoking additional tests 2013-07-04 09:01:36 +02:00
Christian Berendt 37254744b5 remove tests from the wrong test method 2013-07-03 18:41:14 +02:00
Christian Berendt 818e2a364a test moving and copying of subdirectories 2013-07-03 18:38:34 +02:00
Christian Berendt 407753f594 move new tests into the correct test method 2013-07-03 18:34:33 +02:00
Christian Berendt 0a5e18335e test working with files in subdirectories 2013-07-03 18:23:09 +02:00
Christian Berendt e556b7ab55 test working with subdirectories 2013-07-03 18:16:50 +02:00
Christian Berendt 81acfc9498 test copying and moving files in subdirectories 2013-07-03 18:11:54 +02:00
Christian Berendt 21601fd784 increasing difference for modifcation time tests
one second is sometimes not enough when using a slow storage connection,
three seconds is working better (at least when testing against S3)
2013-07-03 18:08:19 +02:00
Robin Appelman 63c898c064 Make rmdir recursive for local storage 2013-06-17 17:34:09 +02:00
Robin Appelman 258ad38fd3 Fix touch for creating new files 2013-04-10 13:48:24 +02:00
Thomas Mueller a05820c659 fixing various filesystem/storage unit tests on windows
fixing copy operation on mapper
2013-03-12 15:30:10 +01:00
Thomas Mueller 191da024fa new test cases added to search in sub folders 2013-02-15 17:40:52 +01:00
Thomas Mueller fd8cb9974b initial version of a local storage implementation which will use unique slugified filename on the local filesystem.
This implementation will only be enabled on windows based system to solve the issues around UTF-8 file names with php on windows.
2013-02-06 23:41:52 +01:00
Robin Appelman 930b9b9cd0 merge master into filesystem 2013-01-26 18:49:45 +01:00
Robin Appelman fb2d2bc201 merge master into filesystem 2012-10-11 22:54:39 +02:00