Skip to content
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

Update appinfo and fix User backend OC_User_* not found #12

Merged
merged 3 commits into from
Oct 22, 2019

Conversation

VicDeo
Copy link
Member

@VicDeo VicDeo commented Oct 22, 2019

Fixes #9

@VicDeo VicDeo self-assigned this Oct 22, 2019
@lucamemini lucamemini mentioned this pull request Oct 22, 2019
@phil-davis
Copy link
Contributor

This gets rid of errors in the "unit tests" where I am getting CI going in another branch.
They used to give errors:

Runtime:       PHP 7.1.32-1+ubuntu18.04.1+deb.sury.org+1 with Xdebug 2.7.2
Configuration: /home/phil/git/owncloud/core/apps-external/user_external/phpunit.xml

EEE                                                                 3 / 3 (100%)

Time: 240 ms, Memory: 22.00MB

There were 3 errors:

1) Test_User_FTP::testLogin
Error: Class 'OC_User_FTP' not found

/home/phil/git/owncloud/core/apps-external/user_external/tests/unit/ftpTest.php:27

2) Test_User_Imap::testLogin
Error: Class 'OC_User_IMAP' not found

/home/phil/git/owncloud/core/apps-external/user_external/tests/unit/imapTest.php:28

3) Test_User_SMB::testLogin
Error: Class 'OC_User_SMB' not found

/home/phil/git/owncloud/core/apps-external/user_external/tests/unit/smbTest.php:28

ERRORS!
Tests: 3, Assertions: 0, Errors: 3.

Now I get:

Runtime:       PHP 7.1.32-1+ubuntu18.04.1+deb.sury.org+1 with Xdebug 2.7.2
Configuration: /home/phil/git/owncloud/core/apps-external/user_external/phpunit.xml

FFsh: 1: smbclient: not found
F                                                                 3 / 3 (100%)

Time: 2.27 seconds, Memory: 22.00MB

There were 3 failures:

1) Test_User_FTP::testLogin
Failed asserting that false matches expected 'test'.

/home/phil/git/owncloud/core/apps-external/user_external/tests/unit/ftpTest.php:32

2) Test_User_Imap::testLogin
Failed asserting that false matches expected 'foo'.

/home/phil/git/owncloud/core/apps-external/user_external/tests/unit/imapTest.php:33

3) Test_User_SMB::testLogin
Your test case is not allowed to access the database.

which is "better" - now the "unit test" issue is just because the tests are currently relying on the various back-ends being available.

@VicDeo
Copy link
Member Author

VicDeo commented Oct 22, 2019

@phil-davis These are NOT unit tests - they depend on FTP/SMB server and won't pass until the env has the servers

@phil-davis
Copy link
Contributor

@phil-davis These are NOT unit tests - they depend on FTP/SMB server and won't pass until the env has the servers

I realise that - they are close to being acceptance tests, since they need real external services.

So someone needs to decide how we proceed here, e.g.

  • delete these "unit" tests
  • make some "ordinary" unit tests
  • make some acceptance tests (that have the real backend services attached...)

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

This is "a good thing".
The state of the "unit" tests that are in this app is a different issue that needs to be sorted out separately from the fix/workaround here.

@phil-davis phil-davis merged commit ae741f4 into master Oct 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the workaroundclasspath branch October 22, 2019 15:53
@VicDeo VicDeo added this to the development milestone Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User backend OC_User_IMAP not found
2 participants