Skip to content

Files External: allow dynamic backend registration - #8032

Merged
DeepDiver1975 merged 10 commits into
masterfrom
fs-backend-registration
Apr 8, 2014
Merged

DeepDiver1975 merged 10 commits into
masterfrom
fs-backend-registration

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Basic porting from the original pull request is done.

…them

Moved dependency check to the individual backends instead of the config

Conflicts:
	apps/files_external/appinfo/app.php
	apps/files_external/lib/config.php
@PVince81

PVince81 commented Apr 3, 2014

Copy link
Copy Markdown
Contributor

Nice one!
I'm pretty sure that unit tests will follow at some point 😉
See tests/mountconfig.php which has grown a lot recently.

Added check for backend's checkDependencies method to OC_Mount_Config::getBackends() when backend is configured to have some instead of blindly calling it and crashing

Conflicts:
	apps/files_external/lib/config.php
	apps/files_external/lib/google.php
Added check for duplicate dependency check messages to display only the first
Crazyphil and others added 4 commits April 3, 2014 16:38
Conflicts:
	apps/files_external/lib/amazons3.php
	apps/files_external/lib/swift.php
Dependency messages now appear below the configuration options instead of above
Reworked dependency check method to support consolidated messages for multiple backends

Conflicts:
	apps/files_external/lib/google.php
	apps/files_external/lib/swift.php
	apps/files_external/templates/settings.php
Conflicts:
	apps/files_external/templates/settings.php
@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

See tests/mountconfig.php which has grown a lot recently.

Nice - I was not aware of this test suite! Awesome!

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@ghost

ghost commented Apr 3, 2014

Copy link
Copy Markdown

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@PVince81 can I ask you review this? THX

@PVince81

PVince81 commented Apr 7, 2014

Copy link
Copy Markdown
Contributor

Is it still in construction ? If not please remove the construction barrier.

@DeepDiver1975 DeepDiver1975 changed the title [WIP] Files External: allow dynamic backend registration Files External: allow dynamic backend registration Apr 7, 2014
@PVince81

PVince81 commented Apr 7, 2014

Copy link
Copy Markdown
Contributor

Code looks nice. I'll do some tests next.

@Xenopathic @icewind1991 can you have a look as well ?

@icewind1991

Copy link
Copy Markdown
Contributor

Code looks good 👍

@PVince81

PVince81 commented Apr 7, 2014

Copy link
Copy Markdown
Contributor

Had a quick test with SMB and FTP in both admin page and personal page.
Still works 👍

A unit test would be nice: register a mock backend and check that it calls "checkDependencies" and others. Feel free to merge this PR first though.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

A unit test would be nice: register a mock backend and check that it calls "checkDependencies" and others. Feel free to merge this PR first though.

Full ACK

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@PVince81 please have a look at the unit tests - THX

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 4 new issues, 24 updated code elements

@ghost

ghost commented Apr 7, 2014

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you relying on the test execution order ? I don't see how "Test_Mount_Config_Dummay_Backend" could be already registered here without going through the previous test.
Ideally you'd want to unregister it in tearDown()``to make sure the next tests are clean (if possible), and in every test re-register the backend, or do it insetUp()`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, setUp() at the end of the file... got me confused.
Please ignore this comment. I'm used to put these at the beginning of the file.

@PVince81

PVince81 commented Apr 8, 2014

Copy link
Copy Markdown
Contributor

Unit tests looks good. I'd usually prefer having setUp and tearDown at the top of the class like in other tests to make sure it is visible (reading order), devs might think that the method is missing.

Anyway, I'm ok to merge this 👍

DeepDiver1975 added a commit that referenced this pull request Apr 8, 2014
Files External: allow dynamic backend registration
@DeepDiver1975
DeepDiver1975 merged commit 411a810 into master Apr 8, 2014
@DeepDiver1975
DeepDiver1975 deleted the fs-backend-registration branch April 8, 2014 09:27
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 22, 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