Commit graph

202 commits

Author SHA1 Message Date
Robin McCorkell
728a22cda1 Use OCP classes as much as possible in files_external 2015-07-01 09:08:28 +02:00
Morris Jobke
f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Morris Jobke
0ab16cb823 Replace replace with sed statement 2015-04-29 09:53:45 +02:00
Morris Jobke
f4bc852db3 Show hint if there is no delete permission
* add class .no-permission which shows the default delete icon
* fixes #15172
* add unit test for no permission and for delete permission
2015-04-23 21:49:59 +02:00
Morris Jobke
4a5c3eea42 Add visibility for method 2015-04-15 17:40:07 +02:00
Vincent Petry
a6c5d65fd6 Fix SFTP storage id to be compatible with older ids
Remove port from SFTP storage id if it is 22.
This will prevent recreating a different storage entry due to id
mismatch after upgrade.
2015-04-15 16:25:47 +02:00
Robin Appelman
519d568847 add unit test 2015-04-02 18:31:26 +02:00
Robin Appelman
10b85871cc adjust unt tests 2015-04-02 18:17:28 +02:00
Robin McCorkell
c2909355bf Merge pull request #14925 from owncloud/ext-mountoptions-ui
Mount options GUI for external storage
2015-03-26 21:36:34 +00:00
Vincent Petry
58b4c2c0e5 Make sure mountOptions keep their data type
str_replace for $user substitution was converting the data type of
mountOptions to string. This fix prevents this to happen by making sure
only strings are processed by substitution.

Also added a int conversion when reading the watcher policy
2015-03-26 19:24:37 +01:00
Jenkins for ownCloud
b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Vincent Petry
ca6b715b31 Added ext storage mount options GUI
Added option to disable autoscan of external storages
Mount option file system scan is now an int
Move priority field to avoid undefined field in storage options

All input elements inside the storage options block get parsed into
storage options.

Moving the priority field outside prevents it to appear in the storage
config, as expected. It is still parsed by special code.
2015-03-26 11:21:03 +01:00
Vincent Petry
847880803e Fix storage priority in JS unit test 2015-03-16 15:07:38 +01:00
Vincent Petry
72632ad402 Generate storage config ids when missing
When reading in old mount.json files, they do not contain config ids.
Since these are needed to be able to use the UI and the new service
classes, these will be generated automatically.

The config grouping is based on a config hash.
2015-03-16 12:18:01 +01:00
Vincent Petry
fb4cf53253 Fix mount config unit tests
Fix expected result now that it returns the status.
Added isset for some properties that are not always present.
2015-03-13 17:43:38 +01:00
Vincent Petry
34c8b1ac77 Mount options for ext storage are now passed around
The mount options are now passed to the UI and stored in a hidden field.
The ext storage controllers and services also know how to load/save them
from the legacy config.
2015-03-13 12:49:11 +01:00
Vincent Petry
ce94a998dd Use storage id + appframework for ext storage CRUD
- Added StorageConfig class to replace ugly arrays
- Implemented StorageService and StorageController for Global and User
  storages
- Async status checking for storages (from Xenopathic)
- Auto-generate id for external storage configs (not the same as
  storage_id)
- Refactor JS classes for external storage settings, this mostly
  moves/encapsulated existing global event handlers into the
  MountConfigListView class.
- Added some JS unit tests for the external storage UI
2015-03-12 18:51:02 +01:00
Robin McCorkell
ed4dc4db07 Fix slash normalization error in AmazonS3Migration unit test
Since aa821ecc00 leading and trailing slashes are
trimmed in the file cache paths
2015-03-04 09:22:21 +00:00
Robin McCorkell
d6b9b37ddb Use dummy storages instead of real storages in files_external unit tests
We were using the SMB and SFTP backends, which since Icewind's new SMB library
results in an actual attempted connection just by constructing the storage.
This commit replaces all references to real storages (except when necessary)
with a dummy storage class.
2015-03-03 17:29:17 +01:00
Thomas Müller
7d3e228365 adding a windows smb config for testing 2015-03-03 17:29:10 +01:00
Thomas Müller
58ec0ea734 Merge pull request #14535 from owncloud/fix-files-external
fix files external test run and add common-tests option
2015-03-02 00:51:38 -08:00
Thomas Müller
f72f9e0159 Merge pull request #14530 from owncloud/revert-14403
Revert "Updating license headers"
2015-02-27 00:39:29 -08:00
Morris Jobke
63f5d7d3d6 apply suggestions from @atmoz to fix SFTP setup 2015-02-26 23:49:18 +01:00
Morris Jobke
62d54e4c2a fix files external test run and add common-tests option 2015-02-26 13:32:44 +01:00
Morris Jobke
06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Robin McCorkell
edfeb05a05 Fix bugs in ownCloud external storage 2015-02-25 10:10:13 +00:00
Thomas Müller
09a06e4f0a Merge pull request #14068 from owncloud/autotest-external-sftp
[files_external] sftp tests
2015-02-24 08:06:27 -08:00
Jenkins for ownCloud
6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Morris Jobke
fadf0a9443 Merge pull request #10673 from owncloud/smb-new
New SMB storage backend
2015-02-16 17:37:20 +01:00
Robin Appelman
6477e39be9 also make sure we have a leading slash for the test root 2015-02-16 14:01:08 +01:00
Thomas Müller
6cdc7a890a Merge pull request #14076 from owncloud/autotest-external-ftp
[files_external] ftp tests
2015-02-16 13:56:40 +01:00
Robin Appelman
35077ec34e remove outdated test 2015-02-16 13:52:11 +01:00
Robin Appelman
d2255a1d30 New SMB storage backend 2015-02-16 13:52:11 +01:00
Thomas Müller
d001c4e375 Merge pull request #13922 from owncloud/smb-autotest-external
[files_external] add SMB autotest
2015-02-16 10:27:55 +01:00
Morris Jobke
60cadf5647 [files_external] ftp tests 2015-02-10 22:34:58 +01:00
Morris Jobke
64a3e6eb22 add rreadme for files external tests 2015-02-10 20:43:32 +01:00
Morris Jobke
10e91c6a48 [files_external] sftp tests 2015-02-10 19:53:01 +01:00
Vincent Petry
bd01ff135a Merge pull request #13190 from is-apps/master-sftp-key
Add SFTP public key authentication support
2015-02-10 16:44:29 +01:00
Morris Jobke
f7bbe081b3 [files_external] add SMB autotest 2015-02-10 10:30:10 +01:00
Vincent Petry
3764515365 Allow saving incomplete external storage config
This is needed for Dropbox and others that need a token.
2015-01-27 13:44:05 +01:00
Vincent Petry
c4b02176dc Fix mount config unit test failures
Because setStorageId now instantiates storages, they might throw
exceptions if arguments are missing.

This fixes the unit test to not throw exceptions and have their default
config arguments set.
2015-01-27 13:44:05 +01:00
Ross Nicoll
64f4f8fc84 Add support for SFTP key authentication
Add support for external files accessed via SFTP using public key exchange authentication.
Keys are generated automatically when the configuration is added, or can be regenerated on demand if a key is compromised.
Creation of a new configuration row now triggers focus on that row. This is used to trigger auto-configuration for SFTP keys.
Generated public keys are saved in user's data directory for easy retrieval by an external application.
Add controller for SFTP key generation AJAX
SFTP class initialisation no longer produces a warning if the password field is missing.
Add unit tests for SFTP with key authentication backend
2015-01-14 17:00:34 +00:00
Morris Jobke
ec0401f97b be more explicit in JS unit tests - caused by accessibility issues 2014-12-18 01:27:58 +01:00
Morris Jobke
7c1b9aedd5 Setup a docker container that holds a webdav instance to test files_external
document docker parameter and use random host port
fix typo
copy autotest.sh to autotest-external.sh
adds ability to add start* and stop* scripts in env in external tests
run files_external WebDAV tests against ownCloud instance
introduce executor number to be able to shut down the correct docker container
fetch docker images in advance - this also fetches latest versions of the docker images
add second argument to autotest-external.sh which can specify a single test to run
print out the explicit test run
change naming schema of files_external setup scripts
2014-12-17 21:50:35 +01:00
Robin Appelman
3bf0922b13 Merge pull request #12527 from owncloud/js-pluginsystem
Simple Plugin system for Javascript
2014-12-12 11:43:31 +01:00
Vincent Petry
bf887eca8b Remove obsoleted filelist prototype backup in tests 2014-12-04 18:39:20 +01:00
Morris Jobke
2c5e4b3d3f Remove last traces of travis integration 2014-12-04 10:09:13 +01:00
Joas Schilling
76ebd3a050 Make apps/ extend the \Test\TestCase and fix overwritten methods 2014-11-19 14:52:09 +01:00
Jörn Friedrich Dreyer
fe9e6be35c test files external amazon s3 storage id migration 2014-10-31 14:26:09 +01:00
Vincent Petry
ab5149f5df Allow specifying protocol in ext storage OC config
Allow specifying a protocol in the host field when mounting another
ownCloud instance. Note that this was already possible with the WebDAV
config but this bug made it inconsistent.
2014-10-13 17:15:58 +02:00
Robin Appelman
5d7bd8be42 Add EtagPropagator to handle etag changes when external storages are changed 2014-10-08 14:22:17 +02:00
Robin Appelman
9a5d0f6084 Fix add/remove mountpoint hooks 2014-10-08 14:22:17 +02:00
Vincent Petry
6585eaa5df Added failing unit tests for mount config hooks 2014-10-08 14:22:17 +02:00
Robin Appelman
6d60630f08 Skip test for unsuported feature for amazon s3 2014-09-17 15:52:00 +02:00
Robin Appelman
6e12d830d5 Fix AmazonS3 rmdir on the root 2014-09-17 15:50:27 +02:00
Robin McCorkell
08e38a1072 Fix mkdir error in mountconfig.php 2014-09-10 17:28:25 +02:00
Robin McCorkell
b754a8261a Load apps in test situations 2014-09-10 17:28:25 +02:00
Morris Jobke
e717833b07 mark tests as skipped - TODO travis
* swift causes some timeouts and test failures
2014-08-05 18:35:47 +02:00
Robin McCorkell
483f86513f Add unit test for multi-user configuration loading 2014-07-15 18:39:09 +01:00
Vincent Petry
fd8b5680dd Merge pull request #8383 from owncloud/object_storage
Object storage
2014-06-27 16:53:03 +02:00
Vincent Petry
586b3a9683 Sync file list with file actions
Whenever file actions are registered later, now the file lists are
automatically notified.

Added FileActions.addUpdateListener() to be able to receive such
notifications.

This removes the need for apps to manually call FileActions.display()
after registering new actions.

This fixes issues with race conditions when file actions are
registered after the file list was already rendered.
2014-06-27 13:41:01 +02:00
Jörn Friedrich Dreyer
42e9d49d72 update files_external swift to php-opencloud v1.9.2 2014-06-25 17:15:59 +02:00
Vincent Petry
58c204abb4 Added JS unit tests for ext storage
Added JS unit tests for the external storage file list extension.
2014-06-17 18:29:07 +02:00
Robin McCorkell
0a8a319915 Fix priority merging logic and add unit test 2014-05-21 22:18:22 +01:00
Robin McCorkell
eae45dca71 Add unit tests 2014-05-21 22:18:22 +01:00
Vincent Petry
0c8ae6eb66 Added ext storage app in autotest unit test run
To make sure that the dynamic mount config and config classes from
external storages are tested, these are now added into the autotest.sh
test run by enabling the app.
2014-05-05 15:03:10 +02:00
Thomas Müller
9128900c56 drop files_irods from apps_external 2014-04-28 12:39:28 +02:00
Bjoern Schiessle
22e0a4b9a8 external storages: allow to mount a folder called "Shared", it is no longer a reserved name 2014-04-23 12:54:25 +02:00
Thomas Müller
3ac009c2b4 unit tests for dynamic backend registration 2014-04-07 20:18:57 +02:00
Vincent Petry
e002b7242c Fix merging of external storage configurations
Merging of configurations is whenever the same config is available for
multiple users/groups, in which case the config is considered as a
single one by the UI, and shows multiple users/groups selected.

Fixed merging logic to make sure that class, mount point and options are
the same before merging them.

Fixed merging to work correctly when the same mount point path is used
for separate users and configs. These are now correctly shows in the UI
as separate entries.
2014-03-26 12:41:25 +01:00
Vincent Petry
9116c39a82 Fixed ext storage password field order issue
The old password field is now preserved in the JSON structure to make
sure that the order is preserved.
This is a quick fix until the UI is fixed to not rely on the PHP array
key order.
2014-03-19 17:56:36 +01:00
Vincent Petry
5b6c36347b Fixed ext storage unit test for groups
Now creating real users and groups for testing external storage mounts
2014-03-19 17:55:34 +01:00
Vincent Petry
8e0a5ed5df Added tests to check mount point list for a target user 2014-03-19 15:21:54 +01:00
Vincent Petry
40a70ecf79 Added password obfuscation for external storage config
Added obfuscation for all "password" options from external storages.
Added unit tests for reading/writing the configuration.
2014-03-19 10:52:22 +01:00
Vincent Petry
e0dada704c Added ext storage unit tests for writing then reload the mount config 2014-03-19 10:52:22 +01:00
Vincent Petry
1f79f368ef Added unit tests for when adding ext storage mount points
- test config was written correctly (global and local)
- test that personal mount points can be added for allowed backends
- test that personal mount points cannot be added for disallowed backends
- added $skipTest flag to make it possible add mount points without
  doing an actual check/connection (note: this is necessary because the
  static class OC_Mount_Config cannot be mocked)
2014-03-18 18:29:08 +01:00
Robin Appelman
f1475671ab Merge branch 'master' into extstorage-configclass 2014-02-21 15:51:41 +01:00
Vincent Petry
b060a17b59 Added extra checks for ext storage class 2014-02-20 10:40:10 +01:00
Vincent Petry
49f2014e0c Revert "Added extra checks for ext storage class"
This reverts commit 9e9a5b9ea1.

Unit tests weren't ready, need further tweaking.
2014-02-20 10:01:49 +01:00
Lukas Reschke
38d6c56249 Merge pull request #7294 from owncloud/extstorage-configclass
Added extra checks for ext storage class
2014-02-20 09:53:52 +01:00
Vincent Petry
9e9a5b9ea1 Added extra checks for ext storage class 2014-02-19 19:08:28 +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
Thomas Müller
a8d20e0919 Merge pull request #5238 from owncloud/externalstorage-owncloudbackend
Added ownCloud backend for external storage
2014-01-08 01:49:15 -08:00
Vincent Petry
84f3dd15a6 Add trailing slash in FTP root path when missing
Fixes #6093
2013-11-28 11:45:26 +01:00
Morris Jobke
a48fc120d0 Merge pull request #6054 from owncloud/extstorage-dropboxfixes
Fixed various Dropbox issues + unit tests
2013-11-26 04:48:54 -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
7c81ac3d28 Fixed various Dropbox issues + unit tests
- fixed touch function to return true on success
- fixed local metadata cache to remove deleted files/directories
- fixed getMetaData() to ignore files reported as deleted by
  Dropbox
- fixed "file not found" case to not log as exception
- fixed "overwrite on rename" case
- fixed unit tests to exclude unsupported cases
- added unit test for touch return value
- unit tests for Dropbox should all run correctly now
2013-11-26 11:59:36 +01:00
Vincent Petry
944d4156bf Fixed FTP storage unit tests to use the correct class 2013-11-25 18:44:34 +01:00
Vincent Petry
2d947835b9 Now also preventing the user of "Shared" as mountpoint 2013-11-22 18:36:27 +01:00
Vincent Petry
476d8e6de0 Added unit test for root mount point validation 2013-11-21 17:26:13 +01:00
Vincent Petry
8ab40f1959 Removing trailing dot in path that samba doesn't seem to like
Fixes #5778
Added unit test for getId() and constructUrl()
2013-11-19 15:05:11 +01:00
Christian Berendt
dd82481f59 add configuration parameter to manually set the timeout of HTTP requests 2013-10-24 16:19:17 +02:00
Christian Berendt
e0bac3ec71 adapted existing test cases 2013-10-22 13:36:23 +02:00
Christian Berendt
f0d04f3ac6 adjustment of the configuration parameters 2013-10-22 13:34:24 +02:00
Vincent Petry
b1f1357957 Added ownCloud backend for external storage
To make it possible to use the short ownCloud URL (without specifying
webdav.php or remote.php), a new backend is available for ownCloud.

The user must specify the host + context path in the "Url" field (which
is mapped to the "host" parameter) and the subdir to mount in the "Root"
field.

This is to prevent confusion because some users forget to append
webdav.php or remote.php to the WebDAV URL.

Fixes #4923
2013-10-09 17:30:22 +02:00
Robin Appelman
51c34777c4 extend test case 2013-10-02 22:28:19 +02:00
Robin Appelman
ea566868a8 return the correct result when doing an smb rename 2013-10-01 22:29:33 +02:00
kondou
9e8a6b704d Add _many_ newlines at the end of files 2013-08-18 11:06:59 +02:00
Bart Visscher
7ad38535e5 Merge pull request #3392 from owncloud/googledrive
Switch to using Google Drive SDK, closes #2047
2013-07-23 12:23:08 -07:00
Michael Gapczynski
c904504365 Remove root option from Google Drive storage, because it is only used for testing and we have our own empty Google account for testing 2013-07-23 10:50:14 -04:00